[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <871qiqjs5n.wl-tiwai@suse.de>
Date: Mon, 05 Jun 2023 09:16:04 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Mirsad Goran Todorovac <mirsad.todorovac@....unizg.hr>
Cc: Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
alsa-devel@...a-project.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, Takashi Iwai <tiwai@...e.com>,
Shuah Khan <shuah@...nel.org>
Subject: Re: [PATCH v1 1/1] selftests: alsa: pcm-test: Fix compiler warnings about the format
On Wed, 24 May 2023 21:15:29 +0200,
Mirsad Goran Todorovac wrote:
>
> GCC 11.3.0 issues warnings in this module about wrong sizes of format
> specifiers:
>
> pcm-test.c: In function ‘test_pcm_time’:
> pcm-test.c:384:68: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 \
> has type ‘unsigned int’ [-Wformat=]
> 384 | snprintf(msg, sizeof(msg), "rate mismatch %ld != %ld", rate, rrate);
> pcm-test.c:455:53: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has \
> type ‘long int’ [-Wformat=]
> 455 | "expected %d, wrote %li", rate, frames);
> pcm-test.c:462:53: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has \
> type ‘long int’ [-Wformat=]
> 462 | "expected %d, wrote %li", rate, frames);
> pcm-test.c:467:53: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has \
> type ‘long int’ [-Wformat=]
> 467 | "expected %d, wrote %li", rate, frames);
>
> Simple fix according to compiler's suggestion removed the warnings.
>
> Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@....unizg.hr>
Applied now. Thanks.
Takashi
Powered by blists - more mailing lists