From 8535c687e8702be28cf82406de2934ccf04478d5 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Sun, 11 Sep 2022 14:44:23 +0200 Subject: [PATCH] tests: mark main()'s "argc" as unused MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Otherwise gcc emits warnings such as > test-spawn.c: In function ‘main’: > test-spawn.c:30:11: warning: unused parameter ‘argc’ [-Wunused-parameter] > 30 | main (int argc, char *argv[]) > | ~~~~^~~~ when "-Wextra" is combined with "-Wall", and "-Wextra" is useful. Signed-off-by: Laszlo Ersek --- test-ls-version.c | 2 +- test-multi-match.c | 2 +- test-spawn.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test-ls-version.c b/test-ls-version.c index 4ce07a3..07413a6 100644 --- a/test-ls-version.c +++ b/test-ls-version.c @@ -35,7 +35,7 @@ #include "tests.h" int -main (int argc, char *argv[]) +main (int argc __attribute__ ((unused)), char *argv[]) { mexp_h *h; int status, r; diff --git a/test-multi-match.c b/test-multi-match.c index bc40b37..96d63e3 100644 --- a/test-multi-match.c +++ b/test-multi-match.c @@ -27,7 +27,7 @@ #include "tests.h" int -main (int argc, char *argv[]) +main (int argc __attribute__ ((unused)), char *argv[]) { mexp_h *h; int status; diff --git a/test-spawn.c b/test-spawn.c index d4d44c7..100280c 100644 --- a/test-spawn.c +++ b/test-spawn.c @@ -27,7 +27,7 @@ #include "tests.h" int -main (int argc, char *argv[]) +main (int argc __attribute__ ((unused)), char *argv[]) { mexp_h *h; int status; -- 1.8.3.1