Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] selftests/clone3: Fix compiler warning
@ 2024-04-09 22:24 Mark Brown
  2024-04-11 21:04 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2024-04-09 22:24 UTC (permalink / raw)
  To: Christian Brauner, Shuah Khan
  Cc: linux-kernel, linux-kselftest, Shuah Khan, Mark Brown

Shuah reported a compiler warning with an Ubuntu GCC 13 build, I've been
unable to reproduce it but hopefully this fixes the issue:

clone3_set_tid.c:136:43: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

Reported-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/clone3/clone3_set_tid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/clone3/clone3_set_tid.c b/tools/testing/selftests/clone3/clone3_set_tid.c
index 9ae38733cb6e..fbf813a5a06f 100644
--- a/tools/testing/selftests/clone3/clone3_set_tid.c
+++ b/tools/testing/selftests/clone3/clone3_set_tid.c
@@ -133,7 +133,7 @@ static void test_clone3_set_tid(const char *desc,
 		"[%d] clone3() with CLONE_SET_TID %d says: %d - expected %d\n",
 		getpid(), set_tid[0], ret, expected);
 
-	ksft_test_result(ret == expected, "%s with %d TIDs and flags 0x%x\n",
+	ksft_test_result(ret == expected, "%s with %zu TIDs and flags 0x%x\n",
 			 desc, set_tid_size, flags);
 }
 

---
base-commit: a053fd3ca5d1b927a8655f239c84b0d790218fda
change-id: 20240409-clone3-warning-fix-89a363c6899e

Best regards,
-- 
Mark Brown <broonie@kernel.org>


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

* Re: [PATCH] selftests/clone3: Fix compiler warning
  2024-04-09 22:24 [PATCH] selftests/clone3: Fix compiler warning Mark Brown
@ 2024-04-11 21:04 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2024-04-11 21:04 UTC (permalink / raw)
  To: Mark Brown, Christian Brauner, Shuah Khan
  Cc: linux-kernel, linux-kselftest, Shuah Khan

On 4/9/24 16:24, Mark Brown wrote:
> Shuah reported a compiler warning with an Ubuntu GCC 13 build, I've been
> unable to reproduce it but hopefully this fixes the issue:
> 
> clone3_set_tid.c:136:43: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
> 
> Reported-by: Shuah Khan <skhan@linuxfoundation.org>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>   tools/testing/selftests/clone3/clone3_set_tid.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/clone3/clone3_set_tid.c b/tools/testing/selftests/clone3/clone3_set_tid.c
> index 9ae38733cb6e..fbf813a5a06f 100644
> --- a/tools/testing/selftests/clone3/clone3_set_tid.c
> +++ b/tools/testing/selftests/clone3/clone3_set_tid.c
> @@ -133,7 +133,7 @@ static void test_clone3_set_tid(const char *desc,
>   		"[%d] clone3() with CLONE_SET_TID %d says: %d - expected %d\n",
>   		getpid(), set_tid[0], ret, expected);
>   
> -	ksft_test_result(ret == expected, "%s with %d TIDs and flags 0x%x\n",
> +	ksft_test_result(ret == expected, "%s with %zu TIDs and flags 0x%x\n",
>   			 desc, set_tid_size, flags);
>   }
>   
> 
> ---
> base-commit: a053fd3ca5d1b927a8655f239c84b0d790218fda
> change-id: 20240409-clone3-warning-fix-89a363c6899e
> 
> Best regards,

Applied to linux-kselftest next for Linux 6.10-rc1.

thanks,
-- Shuah

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

end of thread, other threads:[~2024-04-11 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 22:24 [PATCH] selftests/clone3: Fix compiler warning Mark Brown
2024-04-11 21:04 ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox