diff mbox series

[16/17] tests: fail on compiler warnings and enable Wextra

Message ID 20241118150256.135432-17-cgoettsche@seltendoof.de (mailing list archive)
State New
Headers show
Series [01/17] Fix typos | expand

Commit Message

Christian Göttsche Nov. 18, 2024, 3:02 p.m. UTC
From: Christian Göttsche <cgzones@googlemail.com>

Warnings issued by -Wall and -Wextra most of the time point to actual
issues in the code.  Treat the as error, so the resulting test run
failure will be investigated and the issue handled.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/Makefile b/tests/Makefile
index 35bb358..6af7651 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -6,7 +6,7 @@  INCLUDEDIR ?= $(PREFIX)/include
 SELINUXFS ?= /sys/fs/selinux
 FILESYSTEMS ?= ext4 xfs jfs vfat
 
-export CFLAGS+=-g -O0 -Wall -D_GNU_SOURCE
+export CFLAGS+=-g -O0 -Werror -Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE
 
 DISTRO=$(shell ./os_detect)
 SELINUXFS := $(shell cat /proc/mounts | grep selinuxfs | cut -f 2 -d ' ')