lua: add parents to luaconf.h to quiet a gcc warning
authorH. Peter Anvin <hpa@linux.intel.com>
Fri, 2 Jul 2010 18:18:57 +0000 (11:18 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 2 Jul 2010 18:18:57 +0000 (11:18 -0700)
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@linux.intel.com>
com32/lua/src/luaconf.h

index f39f50e..d285251 100644 (file)
 #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)      \