diff --git a/src/Makefile b/src/Makefile index 3261324d4..150e3c142 100644 --- a/src/Makefile +++ b/src/Makefile @@ -107,6 +107,7 @@ CFLAGS += -Wundef CFLAGS += -Wshadow CFLAGS += -Wmissing-declarations CFLAGS += -Wmissing-prototypes +CFLAGS += -Wpointer-arith CFLAGS += -ftrapv LFLAGS := diff --git a/src/potfile.c b/src/potfile.c index 43e357ab2..da26cea26 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -127,7 +127,7 @@ void *hc_bsearch_r (const void *key, const void *base, size_t nmemb, size_t size const size_t c = l + m; - const void *next = base + (c * size); + const char *next = (char *) base + (c * size); const int cmp = (*compar) (key, next, arg);