From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [182.253.88.132]) by gnuweeb.org (Postfix) with ESMTPSA id 9D18F81A20; Thu, 22 Dec 2022 03:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1671681153; bh=dAu4u8hilpZPllAVwu00C5OS/7zywFlN7MRAKmmU8vY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=feCVYsbUUPipmlfjwXpY+Bispi3vMoCpuOKrfMEolGAzEiNO+8X0jywpx1358j0uD Vf46EbF7dN9cXkvscwqZwrFzkGnV9KUHcM5gUgfU4VY+VKTWJtEa7mE+8N2yvv6itn VLsJvT077b6ewF/6H+NfU8vEqorWBe2iv1NpPncxOjtwIwvDB2FVPn7Mizhi0yZHyn SM9MM0N5h5CbAl+JtmCeJQDnA6sAjMkzijfsL/VXsSWvACwAkWGYSdt61c/75sT3LQ cC/ACddnjE0EI85M/8jEJdLmhNw7lDOJnR8sgP+xHzY7y8YyPOyFZuBpL9oQ7v5cm1 sMou4sZAbNuOA== From: Ammar Faizi To: Willy Tarreau , Shuah Khan , "Paul E. McKenney" Cc: Ammar Faizi , Gilang Fachrezy , VNLX Kernel Department , Alviro Iskandar Setiawan , Kanna Scarlet , Muhammad Rizki , GNU/Weeb Mailing List , Linux Kernel Mailing List , Linux Kselftest Mailing List Subject: [RFC PATCH v1 4/8] selftests/nolibc: Add `-Wall` and `-Wno-unsed-function` to the CFLAGS Date: Thu, 22 Dec 2022 10:51:30 +0700 Message-Id: <20221222035134.3467659-5-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221222035134.3467659-1-ammar.faizi@intel.com> References: <20221222035134.3467659-1-ammar.faizi@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: From: Ammar Faizi 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 --- 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