PVS/V1028 (rework): cast operands, not the result #9531

closes #9522
This commit is contained in:
Justin M. Keyes
2019-01-21 23:49:58 +01:00
committed by GitHub
parent 4cea88aa37
commit bfb8170d32
2 changed files with 8 additions and 9 deletions

View File

@@ -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