From: Takashi Iwai <tiwai@suse.de>
To: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Cc: Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH v1 1/1] selftests: alsa: pcm-test: Fix compiler warnings about the format
Date: Mon, 05 Jun 2023 09:16:04 +0200 [thread overview]
Message-ID: <871qiqjs5n.wl-tiwai@suse.de> (raw)
In-Reply-To: <20230524191528.13203-1-mirsad.todorovac@alu.unizg.hr>
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@alu.unizg.hr>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2023-06-05 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 19:15 [PATCH v1 1/1] selftests: alsa: pcm-test: Fix compiler warnings about the format Mirsad Goran Todorovac
2023-05-25 9:22 ` Mark Brown
2023-05-26 19:25 ` Mirsad Goran Todorovac
2023-06-05 7:16 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qiqjs5n.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mirsad.todorovac@alu.unizg.hr \
--cc=perex@perex.cz \
--cc=shuah@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox