[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221222035134.3467659-5-ammar.faizi@intel.com>
Date: Thu, 22 Dec 2022 10:51:30 +0700
From: Ammar Faizi <ammarfaizi2@...weeb.org>
To: Willy Tarreau <w@....eu>, Shuah Khan <shuah@...nel.org>,
"Paul E. McKenney" <paulmck@...nel.org>
Cc: Ammar Faizi <ammarfaizi2@...weeb.org>,
Gilang Fachrezy <gilang4321@...il.com>,
VNLX Kernel Department <kernel@...x.org>,
Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>,
Kanna Scarlet <knscarlet@...weeb.org>,
Muhammad Rizki <kiizuha@...weeb.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Kselftest Mailing List
<linux-kselftest@...r.kernel.org>
Subject: [RFC PATCH v1 4/8] selftests/nolibc: Add `-Wall` and `-Wno-unsed-function` to the CFLAGS
From: Ammar Faizi <ammarfaizi2@...weeb.org>
Turn on more compiler warnings to help spot issues. Skip unused
function warning as it's inevitable in the nolibc test suite.
While adding these flags, remove unused variables in run_stdlib()
warned by the `-Wall` flag.
Signed-off-by: Ammar Faizi <ammarfaizi2@...weeb.org>
---
tools/testing/selftests/nolibc/Makefile | 2 +-
tools/testing/selftests/nolibc/nolibc-test.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 572fe72df68d..f6602a2c2bbd 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -66,7 +66,7 @@ else
Q=@
endif
-CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables
+CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -Wall -Wno-unused-function
LDFLAGS := -s
help:
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index f14f5076fb6d..8d69f8a0f35a 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -542,9 +542,7 @@ int run_syscall(int min, int max)
int run_stdlib(int min, int max)
{
int test;
- int tmp;
int ret = 0;
- void *p1, *p2;
for (test = min; test >= 0 && test <= max; test++) {
int llen = 0; // line length
--
Ammar Faizi
Powered by blists - more mailing lists