aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/assert.h
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-21 23:49:58 +0100
committerGitHub <noreply@github.com>2019-01-21 23:49:58 +0100
commitbfb8170d32919dffee9d78a9afc298dc98fca5ba (patch)
treea3d735fa11eb34e73da55432b08d7672a3ac7d49 /src/nvim/assert.h
parent4cea88aa3771ef9ae943e7a472dd37c39339d118 (diff)
downloadrneovim-bfb8170d32919dffee9d78a9afc298dc98fca5ba.tar.gz
rneovim-bfb8170d32919dffee9d78a9afc298dc98fca5ba.tar.bz2
rneovim-bfb8170d32919dffee9d78a9afc298dc98fca5ba.zip
PVS/V1028 (rework): cast operands, not the result #9531
closes #9522
Diffstat (limited to 'src/nvim/assert.h')
-rw-r--r--src/nvim/assert.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/assert.h b/src/nvim/assert.h
index db21bed0e2..6e8e57c183 100644
--- a/src/nvim/assert.h
+++ b/src/nvim/assert.h
@@ -145,7 +145,7 @@
} while (0)
#else
# define STRICT_ADD(a, b, c, t) \
- do { *(c) = (t)(a + b); } while (0)
+ do { *(c) = (t)((a) + (b)); } while (0)
#endif
/// @def STRICT_SUB
@@ -160,7 +160,7 @@
} while (0)
#else
# define STRICT_SUB(a, b, c, t) \
- do { *(c) = (t)(a - b); } while (0)
+ do { *(c) = (t)((a) - (b)); } while (0)
#endif
#endif // NVIM_ASSERT_H