aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/macros.h
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-05-15 15:04:56 +0200
committerGitHub <noreply@github.com>2022-05-15 21:04:56 +0800
commit793496aecc23fdee93040fc94ca3e1a66da73039 (patch)
tree2a7de4d94f7c04e0340b595ad059c0e5e49472c1 /src/nvim/macros.h
parent4c7462fdb313a64d6903809ece2d8d564c0ea420 (diff)
downloadrneovim-793496aecc23fdee93040fc94ca3e1a66da73039.tar.gz
rneovim-793496aecc23fdee93040fc94ca3e1a66da73039.tar.bz2
rneovim-793496aecc23fdee93040fc94ca3e1a66da73039.zip
fix PVS warnings (#18459)
* fix(PVS/V547): remove ifs that are always true or false * fix(PVS/V560): remove partial conditions that are always true * fix(PVS/V1044): suppress warning about loop break conditions * fix(PVS/V1063): suppress "modulo by 1 operation is meaningless" * fix(PVS/V568): suppress "operator evaluates the size of a pointer" Also mark vim-patch:8.2.4958 as ported.
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r--src/nvim/macros.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h
index d57ab65d45..c9c424568d 100644
--- a/src/nvim/macros.h
+++ b/src/nvim/macros.h
@@ -56,12 +56,14 @@
// Returns empty string if it is NULL.
#define EMPTY_IF_NULL(x) (char *)((x) ? (x) : (char_u *)"")
-// Adjust chars in a language according to 'langmap' option.
-// NOTE that there is no noticeable overhead if 'langmap' is not set.
-// When set the overhead for characters < 256 is small.
-// Don't apply 'langmap' if the character comes from the Stuff buffer or from a
-// mapping and the langnoremap option was set.
-// The do-while is just to ignore a ';' after the macro.
+/// Adjust chars in a language according to 'langmap' option.
+/// NOTE that there is no noticeable overhead if 'langmap' is not set.
+/// When set the overhead for characters < 256 is small.
+/// Don't apply 'langmap' if the character comes from the Stuff buffer or from a
+/// mapping and the langnoremap option was set.
+/// The do-while is just to ignore a ';' after the macro.
+///
+/// -V:LANGMAP_ADJUST:560
#define LANGMAP_ADJUST(c, condition) \
do { \
if (*p_langmap \