debug compile is now pedantic + fixed pointer comparison issue

Thu, 14 Feb 2013 22:26:36 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 14 Feb 2013 22:26:36 +0100
changeset 39
4761bc1b0278
parent 38
7ded3ec4c417
child 40
5938a9b74e8e

debug compile is now pedantic + fixed pointer comparison issue

gcc-debug.mk file | annotate | diff | comparison | revisions
src/arguments.c file | annotate | diff | comparison | revisions
--- a/gcc-debug.mk	Fri Dec 28 17:15:23 2012 +0100
+++ b/gcc-debug.mk	Thu Feb 14 22:26:36 2013 +0100
@@ -27,5 +27,5 @@
 
 CC = gcc
 LD = gcc
-CFLAGS = -Wall -std=gnu99 -O0 -ggdb
+CFLAGS = -Wall -Werror -pedantic -std=gnu99 -O0 -ggdb
 LDFLAGS = 
--- a/src/arguments.c	Fri Dec 28 17:15:23 2012 +0100
+++ b/src/arguments.c	Thu Feb 14 22:26:36 2013 +0100
@@ -39,7 +39,7 @@
   if (arg[0] == '-') {
     if (arg[1] != '-') {
       for (int t = 0 ; t < len ; t++) {
-        ret |= (strchr(arg, expected[t]) > 0) << t;
+        ret |= (strchr(arg, expected[t])?1:0) << t;
       }
     }
   }

mercurial