aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMirsad Todorovac <[email protected]>2024-01-07 18:37:06 +0100
committerTakashi Iwai <[email protected]>2024-01-09 15:14:46 +0100
commitf77a255e74c348a158d21a471e993e70ff710737 (patch)
treed86eb9ba15d374a3cb598d1d4a5b16f4c1b26976
parent3f47c1ebe5ca9c5883e596c7888dec4bec0176d8 (diff)
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: 10f2f194663af ("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]>
-rw-r--r--tools/testing/selftests/alsa/mixer-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/alsa/mixer-test.c b/tools/testing/selftests/alsa/mixer-test.c
index df942149c6f6..1c04e5f638a0 100644
--- a/tools/testing/selftests/alsa/mixer-test.c
+++ b/tools/testing/selftests/alsa/mixer-test.c
@@ -347,7 +347,7 @@ static bool ctl_value_index_valid(struct ctl_data *ctl,
}
if (int_val >= snd_ctl_elem_info_get_items(ctl->info)) {
- ksft_print_msg("%s.%d value %ld more than item count %ld\n",
+ ksft_print_msg("%s.%d value %ld more than item count %u\n",
ctl->name, index, int_val,
snd_ctl_elem_info_get_items(ctl->info));
return false;