Re: [PATCH v1 1/1] selftests: alsa: pcm-test: Fix compiler warnings about the format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>

Applied now.  Thanks.


Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux