Makefiles: Enable -Wextra
Enable -Wextra and disable the unused parameter and different signedness
in comparison warnings.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/src/Makefile b/src/Makefile
index 9bbbacf..3099f7c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -4,7 +4,8 @@
libdevdir ?= $(prefix)/lib
CFLAGS ?= -g -fomit-frame-pointer -O2
-override CFLAGS += -Wall -Iinclude/ -include ../config-host.h
+override CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare\
+ -Iinclude/ -include ../config-host.h
SO_CFLAGS=-shared -fPIC $(CFLAGS)
L_CFLAGS=$(CFLAGS)
LINK_FLAGS=
diff --git a/test/Makefile b/test/Makefile
index 93e58f4..e103296 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -5,7 +5,9 @@
CFLAGS ?= -g -O2
XCFLAGS =
-override CFLAGS += -Wall -D_GNU_SOURCE -L../src/ -I../src/include/ -include ../config-host.h -D__SANE_USERSPACE_TYPES__
+override CFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare\
+ -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -L../src/ \
+ -I../src/include/ -include ../config-host.h
all_targets += poll poll-cancel ring-leak fsync io_uring_setup io_uring_register \
io_uring_enter nop sq-full cq-full 35fa71a030ca-test \