From 8c2e11caae436a45aa74e845bc424f74028e048c Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 21 Jul 2017 18:21:15 -0700 Subject: [PATCH] Enable -Wall and -Wextra --- Makefile | 2 +- src/strmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }