diff mbox series

[v2,03/32] selftests: harness: Ignore unused variant argument warning

Message ID 20250407-nolibc-kselftest-harness-v2-3-f8812f76e930@linutronix.de
State Superseded
Headers show
Series kselftest harness and nolibc compatibility | expand

Commit Message

Thomas Weißschuh April 7, 2025, 6:52 a.m. UTC
For tests without fixtures the variant argument is unused.
This is intentional, prevent to compiler from complaining.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 tools/testing/selftests/kselftest_harness.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Shuah Khan April 10, 2025, 3:33 p.m. UTC | #1
On 4/7/25 00:52, Thomas Weißschuh wrote:
> For tests without fixtures the variant argument is unused.
> This is intentional, prevent to compiler from complaining.
> 

Include the warning in the change log for reference.

> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>   tools/testing/selftests/kselftest_harness.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
> index bac4327775ea65dbe977e9b22ee548bedcbd33ff..2b350ed60b2bf1cbede8e3a9b4ac5fe716900144 100644
> --- a/tools/testing/selftests/kselftest_harness.h
> +++ b/tools/testing/selftests/kselftest_harness.h
> @@ -174,7 +174,7 @@
>   	static void test_name(struct __test_metadata *_metadata); \
>   	static inline void wrapper_##test_name( \
>   		struct __test_metadata *_metadata, \
> -		struct __fixture_variant_metadata *variant) \
> +		struct __fixture_variant_metadata __attribute__((unused)) *variant) \
>   	{ \
>   		_metadata->setup_completed = true; \
>   		if (setjmp(_metadata->env) == 0) \
> 

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
index bac4327775ea65dbe977e9b22ee548bedcbd33ff..2b350ed60b2bf1cbede8e3a9b4ac5fe716900144 100644
--- a/tools/testing/selftests/kselftest_harness.h
+++ b/tools/testing/selftests/kselftest_harness.h
@@ -174,7 +174,7 @@ 
 	static void test_name(struct __test_metadata *_metadata); \
 	static inline void wrapper_##test_name( \
 		struct __test_metadata *_metadata, \
-		struct __fixture_variant_metadata *variant) \
+		struct __fixture_variant_metadata __attribute__((unused)) *variant) \
 	{ \
 		_metadata->setup_completed = true; \
 		if (setjmp(_metadata->env) == 0) \