Message ID | 20240107151218.933806-2-mirsad.todorovac@alu.unizg.hr (mailing list archive) |
---|---|
State | Accepted |
Commit | 8c51c13dc63d46e754c44215eabc0890a8bd9bfb |
Headers | show |
Series | kselftest: alsa: Fix a couple of format specifiers and function parameters | expand |
On Sun, Jan 07, 2024 at 04:12:16PM +0100, Mirsad Todorovac wrote: > Fix the number of arguments to error reporting function in the test program > as reported in the GCC 13.2.0 warning: Acked-by: Mark Brown <broonie@kernel.org>
diff --git a/tools/testing/selftests/alsa/mixer-test.c b/tools/testing/selftests/alsa/mixer-test.c index 23df154fcdd7..208c2170c074 100644 --- a/tools/testing/selftests/alsa/mixer-test.c +++ b/tools/testing/selftests/alsa/mixer-test.c @@ -166,7 +166,7 @@ static void find_controls(void) err = snd_ctl_poll_descriptors(card_data->handle, &card_data->pollfd, 1); if (err != 1) { - ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for %d\n", + ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for card %d: %d\n", card, err); }
Fix the number of arguments to error reporting function in the test program as reported in the GCC 13.2.0 warning: mixer-test.c: In function ‘find_controls’: mixer-test.c:169:44: warning: too many arguments for format [-Wformat-extra-args] 169 | ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The number of arguments in call to ksft_exit_fail_msg() doesn't correspond to the format specifiers, so this is adjusted to mimic the sibling calls to the error function. Fixes: b1446bda56456 ("kselftest: alsa: Check for event generation when we write to controls") Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Shuah Khan <shuah@kernel.org> Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr> --- tools/testing/selftests/alsa/mixer-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)