2023-07-31 07:23:56

by Thomas Weißschuh

[permalink] [raw]
Subject: [PATCH 0/4] tools/nolibc: enable compiler warnings

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

Signed-off-by: Thomas Weißschuh <[email protected]>
---
Thomas Weißschuh (4):
selftests/nolibc: drop unused test helpers
selftests/nolibc: drop unused variables
tools/nolibc: drop unused variables
selftests/nolibc: enable -Wall compiler warnings

tools/include/nolibc/sys.h | 1 -
tools/testing/selftests/nolibc/Makefile | 2 +-
tools/testing/selftests/nolibc/nolibc-test.c | 103 ---------------------------
3 files changed, 1 insertion(+), 105 deletions(-)
---
base-commit: dfef4fc45d5713eb23d87f0863aff9c33bd4bfaf
change-id: 20230731-nolibc-warnings-c6e47284ac03

Best regards,
--
Thomas Weißschuh <[email protected]>



2023-07-31 07:25:05

by Thomas Weißschuh

[permalink] [raw]
Subject: [PATCH 2/4] selftests/nolibc: drop unused variables

These got copied around as new testcases where created.

Signed-off-by: Thomas Weißschuh <[email protected]>
---
tools/testing/selftests/nolibc/nolibc-test.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 53e2d448eded..3064191681d0 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -786,9 +786,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 */
@@ -929,9 +927,7 @@ static int expect_vfprintf(int llen, size_t c, const char *expected, const char
static int run_vfprintf(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 */

--
2.41.0


2023-07-31 08:23:43

by Thomas Weißschuh

[permalink] [raw]
Subject: [PATCH 3/4] tools/nolibc: drop unused variables

Nobody needs it, get rid of it.

Signed-off-by: Thomas Weißschuh <[email protected]>
---
tools/include/nolibc/sys.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 8bfe7db20b80..889ccf5f0d56 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -738,7 +738,6 @@ static __attribute__((unused))
int open(const char *path, int flags, ...)
{
mode_t mode = 0;
- int ret;

if (flags & O_CREAT) {
va_list args;

--
2.41.0