[syslinux:master] lua: add parents to luaconf.h to quiet a gcc warning
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Fri Jul 2 11:21:03 PDT 2010
Commit-ID: d1e65715467febf68f72b908cf8d43b45548549d
Gitweb: http://syslinux.zytor.com/commit/d1e65715467febf68f72b908cf8d43b45548549d
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Fri, 2 Jul 2010 11:18:57 -0700
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Fri, 2 Jul 2010 11:18:57 -0700
lua: add parents to luaconf.h to quiet a gcc warning
gcc warns about suspicious-looking code with a comparison inside ==.
The code is correct, but add parens so that gcc know we know it is
correct.
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
com32/lua/src/luaconf.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/com32/lua/src/luaconf.h b/com32/lua/src/luaconf.h
index f39f50e..d285251 100644
--- a/com32/lua/src/luaconf.h
+++ b/com32/lua/src/luaconf.h
@@ -564,13 +564,13 @@
#define luai_numdiv(a,b) \
(-1/2? \
(a)/(b): \
- ((a)<0==(b)<0||(a)%(b)==0? \
+ (((a)<0)==((b)<0)||(a)%(b)==0? \
(a)/(b): \
(a)/(b)-1))
#define luai_nummod(a,b) \
(-1/2? \
(a)%(b): \
- ((a)<0==(b)<0||(a)%(b)==0? \
+ (((a)<0)==((b)<0)||(a)%(b)==0? \
(a)%(b): \
(a)%(b)+(b)))
#define luai_lnumdiv(a,b) \
More information about the Syslinux-commits
mailing list