Skip to content

Commit f77a255

Browse files
Mirsad Todorovactiwai
authored andcommitted
kselftest/alsa - mixer-test: Fix the print format specifier warning
GCC 13.2.0 compiler issued the following warning: mixer-test.c:350:80: warning: format ‘%ld’ expects argument of type ‘long int’, \ but argument 5 has type ‘unsigned int’ [-Wformat=] 350 | ksft_print_msg("%s.%d value %ld more than item count %ld\n", | ~~^ | | | long int | %d 351 | ctl->name, index, int_val, 352 | snd_ctl_elem_info_get_items(ctl->info)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | unsigned int Fixing the format specifier in call to ksft_print_msg() according to the compiler suggestion silences the warning. Fixes: 10f2f19 ("kselftest: alsa: Validate values read from enumerations") Cc: Mark Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Shuah Khan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Mirsad Todorovac <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 3f47c1e commit f77a255

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/alsa/mixer-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ static bool ctl_value_index_valid(struct ctl_data *ctl,
347347
}
348348

349349
if (int_val >= snd_ctl_elem_info_get_items(ctl->info)) {
350-
ksft_print_msg("%s.%d value %ld more than item count %ld\n",
350+
ksft_print_msg("%s.%d value %ld more than item count %u\n",
351351
ctl->name, index, int_val,
352352
snd_ctl_elem_info_get_items(ctl->info));
353353
return false;

0 commit comments

Comments
 (0)