mbpfan-josie

Enable -Wall and -Wextra

8c2e11caae436a45aa74e845bc424f74028e048c
Andrew Gaul <andrew@gaul.org> · 2017-07-21T18:21 · browse files at this commit

parents: f1bdb61

diff --git a/Makefile b/Makefile
index ed2390a..b5e1868 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ BINFLAG = -o
 INCLUDES =
 LIBS = -lm
 LIBPATH =
-CFLAGS +=  $(COPT) -g $(INCLUDES) #-Wall
+CFLAGS +=  $(COPT) -g $(INCLUDES) -Wall -Wextra -Wno-unused-function
 LDFLAGS += $(LIBPATH) -g $(LIBS) #-Wall
 
 OBJS := $(patsubst %.$(C),%.$(OBJ),$(wildcard $(SOURCE_PATH)*.$(C)))
diff --git a/src/strmap.c b/src/strmap.c
index d553b44..45853e3 100644
--- a/src/strmap.c
+++ b/src/strmap.c
@@ -389,7 +389,7 @@ static unsigned long hash(const char *str)
     unsigned long hash = 5381;
     int c;
 
-    while (c = *str++) {
+    while ((c = *str++)) {
         hash = ((hash << 5) + hash) + c;
     }