mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
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.
This commit is contained in:
@@ -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 \
|
||||
|
Reference in New Issue
Block a user