blob: 3e000e7ad99639981193f9f263b023cc580e9798 [file] [log] [blame]
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
Subject: selftests/mm: Makefile: add the compiler flags
Date: Thu, 9 Jan 2025 22:38:42 +0500
Add the compiler flags to catch warnings during development.
Link: https://lkml.kernel.org/r/20250109173842.1142376-17-usama.anjum@collabora.com
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Will Drewry <wad@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/testing/selftests/mm/Makefile | 1 +
1 file changed, 1 insertion(+)
--- a/tools/testing/selftests/mm/Makefile~selftests-mm-makefile-add-the-compiler-flags
+++ a/tools/testing/selftests/mm/Makefile
@@ -34,6 +34,7 @@ endif
MAKEFLAGS += --no-builtin-rules
CFLAGS = -Wall -O2 -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES)
+CFLAGS += -Wunreachable-code -Wunused -Wunused-parameter -Wunused-function -Wunused-variable
LDLIBS = -lrt -lpthread -lm
# Some distributions (such as Ubuntu) configure GCC so that _FORTIFY_SOURCE is
_