]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: harness: Ignore unused variant argument warning
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 5 May 2025 15:15:21 +0000 (17:15 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Wed, 21 May 2025 13:32:31 +0000 (15:32 +0200)
commit6c409e0d87e340c2ce16fc3a1dd5b625c73fe54b
tree075e3268f8283673073c9fd27c79d168c163f079
parent575eca2c8c7d40a1dccb0e3abc58ed13f45c4e8a
selftests: harness: Ignore unused variant argument warning

For tests without fixtures the variant argument is unused.
This is intentional, prevent to compiler from complaining.

Example warning:

    harness-selftest.c: In function 'wrapper_standalone_pass':
    ../kselftest_harness.h:181:52: error: unused parameter 'variant' [-Werror=unused-parameter]
      181 |                 struct __fixture_variant_metadata *variant) \
          |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    ../kselftest_harness.h:156:25: note: in expansion of macro '__TEST_IMPL'
      156 | #define TEST(test_name) __TEST_IMPL(test_name, -1)
          |                         ^~~~~~~~~~~
    harness-selftest.c:15:1: note: in expansion of macro 'TEST'
       15 | TEST(standalone_pass) {
          | ^~~~

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-3-ee4dd5257135@linutronix.de
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/testing/selftests/kselftest_harness.h