summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/Makefile4
-rw-r--r--examples/gehashmap.c10
-rw-r--r--examples/gevector.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/examples/Makefile b/examples/Makefile
index af41d5d..c6c5643 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,7 +1,8 @@
.POSIX:
CC = cc
-CFLAGS = -Og -g -ggdb
+CFLAGS = -Wall -Wextra -Wpedantic -Werror \
+ -Og -g -ggdb
LDFLAGS = -I../src
progs = gehashmap gevector
@@ -9,7 +10,6 @@ progs = gehashmap gevector
all: ${progs}
gehashmap: gehashmap.c
-
gevector: gevector.c
clean:
diff --git a/examples/gehashmap.c b/examples/gehashmap.c
index df91669..7d6d1a4 100644
--- a/examples/gehashmap.c
+++ b/examples/gehashmap.c
@@ -4,10 +4,10 @@
#include <gehashmap.h>
-GEHASHMAP_API(char *, int, atoimap);
-GEHASHMAP_API(int, unsigned int, itoumap);
-GEHASHMAP_IMPL(char *, int, atoimap);
-GEHASHMAP_IMPL(int, unsigned int, itoumap);
+GEHASHMAP_API(char *, int, atoimap)
+GEHASHMAP_API(int, unsigned int, itoumap)
+GEHASHMAP_IMPL(char *, int, atoimap)
+GEHASHMAP_IMPL(int, unsigned int, itoumap)
bool
atoimap_key_iseq(char *a, char *b)
@@ -39,7 +39,7 @@ atoimap_key_hash(char *s)
char c;
size_t x = 5381;
- while (c = *s++)
+ while ((c = *s++))
x = ((x << 5) + x) + c;
return x;
diff --git a/examples/gevector.c b/examples/gevector.c
index e554005..15adbad 100644
--- a/examples/gevector.c
+++ b/examples/gevector.c
@@ -3,8 +3,8 @@
#include <gevector.h>
-GEVECTOR_API(int, ivec);
-GEVECTOR_IMPL(int, ivec);
+GEVECTOR_API(int, ivec)
+GEVECTOR_IMPL(int, ivec)
int
main(void)