linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] tools/nolibc: enable compiler warnings
@ 2023-08-01  5:30 Thomas Weißschuh
  2023-08-01  5:30 ` [PATCH v2 01/10] tools/nolibc: drop unused variables Thomas Weißschuh
                   ` (10 more replies)
  0 siblings, 11 replies; 28+ messages in thread
From: Thomas Weißschuh @ 2023-08-01  5:30 UTC (permalink / raw)
  To: Willy Tarreau, Shuah Khan
  Cc: linux-kselftest, linux-kernel, Yuan Tan, Zhangjin Wu,
	Thomas Weißschuh

To help the developers to avoid mistakes and keep the code smaller let's
enable compiler warnings.

I stuck with __attribute__((unused)) over __maybe_unused in
nolibc-test.c for consistency with nolibc proper.
If we want to add a define it needs to be added twice once for nolibc
proper and once for nolibc-test otherwise libc-test wouldn't build
anymore.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v2:
- Don't drop unused test helpers, mark them as __attribute__((unused))
- Make some function in nolibc-test static
- Also handle -W and -Wextra
- Link to v1: https://lore.kernel.org/r/20230731-nolibc-warnings-v1-0-74973d2a52d7@weissschuh.net

---
Thomas Weißschuh (10):
      tools/nolibc: drop unused variables
      tools/nolibc: sys: avoid implicit sign cast
      tools/nolibc: stdint: use int for size_t on 32bit
      selftests/nolibc: drop unused variables
      selftests/nolibc: mark test helpers as potentially unused
      selftests/nolibc: make functions static if possible
      selftests/nolibc: avoid unused arguments warnings
      selftests/nolibc: avoid sign-compare warnings
      selftests/nolibc: test return value of read() in test_vfprintf
      selftests/nolibc: enable compiler warnings

 tools/include/nolibc/stdint.h                |   4 +
 tools/include/nolibc/sys.h                   |   3 +-
 tools/testing/selftests/nolibc/Makefile      |   2 +-
 tools/testing/selftests/nolibc/nolibc-test.c | 108 +++++++++++++++++----------
 4 files changed, 74 insertions(+), 43 deletions(-)
---
base-commit: dfef4fc45d5713eb23d87f0863aff9c33bd4bfaf
change-id: 20230731-nolibc-warnings-c6e47284ac03

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2023-08-03  2:10 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01  5:30 [PATCH v2 00/10] tools/nolibc: enable compiler warnings Thomas Weißschuh
2023-08-01  5:30 ` [PATCH v2 01/10] tools/nolibc: drop unused variables Thomas Weißschuh
2023-08-01  5:30 ` [PATCH v2 02/10] tools/nolibc: sys: avoid implicit sign cast Thomas Weißschuh
2023-08-01  5:30 ` [PATCH v2 03/10] tools/nolibc: stdint: use int for size_t on 32bit Thomas Weißschuh
2023-08-01  5:30 ` [PATCH v2 04/10] selftests/nolibc: drop unused variables Thomas Weißschuh
2023-08-01  5:30 ` [PATCH v2 05/10] selftests/nolibc: mark test helpers as potentially unused Thomas Weißschuh
2023-08-01  5:30 ` [PATCH v2 06/10] selftests/nolibc: make functions static if possible Thomas Weißschuh
2023-08-01  6:52   ` Willy Tarreau
2023-08-01  7:34     ` Thomas Weißschuh
2023-08-01  8:13       ` Willy Tarreau
2023-08-01  8:50         ` Thomas Weißschuh
2023-08-01  9:13           ` Willy Tarreau
2023-08-01  5:30 ` [PATCH v2 07/10] selftests/nolibc: avoid unused arguments warnings Thomas Weißschuh
2023-08-01  8:07   ` Willy Tarreau
2023-08-01  8:13     ` Thomas Weißschuh
2023-08-01 10:15       ` Zhangjin Wu
2023-08-01 10:17         ` Thomas Weißschuh 
2023-08-01  5:30 ` [PATCH v2 08/10] selftests/nolibc: avoid sign-compare warnings Thomas Weißschuh
2023-08-01  5:48   ` Zhangjin Wu
2023-08-01  5:57     ` Thomas Weißschuh
2023-08-01  6:50       ` Zhangjin Wu
2023-08-01  5:30 ` [PATCH v2 09/10] selftests/nolibc: test return value of read() in test_vfprintf Thomas Weißschuh
2023-08-01  6:59   ` Willy Tarreau
2023-08-01  7:48     ` Thomas Weißschuh
2023-08-01  5:30 ` [PATCH v2 10/10] selftests/nolibc: enable compiler warnings Thomas Weißschuh
2023-08-02 20:22 ` [PATCH v2 00/10] tools/nolibc: " Willy Tarreau
2023-08-02 21:10   ` Thomas Weißschuh
2023-08-03  2:10     ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).