lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250123-nolibc-prototype-v1-2-e1afc5c1999a@weissschuh.net>
Date: Thu, 23 Jan 2025 21:10:43 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Willy Tarreau <w@....eu>, Shuah Khan <shuah@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org, 
 Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 2/3] selftests/nolibc: ignore -Wmissing-prototypes

To make sure nolibc itself is compatible with -Wmissing-prototypes the
compiler flag should be enabled when building nolibc-test.
However some of its functions are non-static to ease debugging [0],
triggering the compiler warning.

Disable the warning inside nolibc-test while still enabling it for
nolibc itself.

[0] https://lore.kernel.org/lkml/ZMjM0UPRAqoC+goY@1wt.eu/

Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>

---
It's a bit iffy, but I only see three possibilities:
1) Make the functions static
2) Use #pragma
3) Add dummy prototypes

1) was NACK-ed before, so I used 2)
---
 tools/testing/selftests/nolibc/nolibc-test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 0e0e3b48a8c3a6802c6989954b6f3a7c7258db43..f162793b162f9b1ec687098b9094a6d247a53e99 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -43,6 +43,8 @@
 #endif
 #endif
 
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+
 #include "nolibc-test-linkage.h"
 
 /* for the type of int_fast16_t and int_fast32_t, musl differs from glibc and nolibc */

-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ