public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse•de>
To: Arnd Bergmann <arnd@kernel•org>
Cc: Rob Herring <robh@kernel•org>,
	alsa-devel@alsa-project•org, Arnd Bergmann <arnd@arndb•de>,
	linux-kernel@vger•kernel.org, llvm@lists•linux.dev,
	Nick Desaulniers <ndesaulniers@google•com>,
	Takashi Iwai <tiwai@suse•com>,
	linux-sound@vger•kernel.org, Jaroslav Kysela <perex@perex•cz>,
	Nathan Chancellor <nathan@kernel•org>,
	Bill Wendling <morbo@google•com>,
	Justin Stitt <justinstitt@google•com>,
	Jakub Kicinski <kuba@kernel•org>,
	Johannes Berg <johannes@sipsolutions•net>,
	linuxppc-dev@lists•ozlabs.org, Dawei Li <set_pte_at@outlook•com>
Subject: Re: [PATCH 8/9] ALSA: aoa: avoid false-positive format truncation warning
Date: Wed, 27 Mar 2024 10:54:12 +0100	[thread overview]
Message-ID: <87il1880fv.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240326223825.4084412-9-arnd@kernel.org>

On Tue, 26 Mar 2024 23:38:07 +0100,
Arnd Bergmann wrote:
> 
> From: Arnd Bergmann <arnd@arndb•de>
> 
> clang warns about what it interprets as a truncated snprintf:
> 
> sound/aoa/soundbus/i2sbus/core.c:171:6: error: 'snprintf' will always be truncated; specified size is 6, but format string expands to at least 7 [-Werror,-Wformat-truncation-non-kprintf]
> 
> The actual problem here is that it does not understand the special
> %pOFn format string and assumes that it is a pointer followed by
> the string "OFn", which would indeed not fit.
> 
> Slightly increasing the size of the buffer to its natural alignment
> avoids the warning, as it is now long enough for the correct and
> the incorrect interprations.
> 
> Fixes: b917d58dcfaa ("ALSA: aoa: Convert to using %pOFn instead of device_node.name")
> Signed-off-by: Arnd Bergmann <arnd@arndb•de>

Applied this one now to sound.git tree.  Thanks.


Takashi

  reply	other threads:[~2024-03-27  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 22:37 [PATCH 0/9] enabled -Wformat-truncation for clang Arnd Bergmann
2024-03-26 22:38 ` [PATCH 8/9] ALSA: aoa: avoid false-positive format truncation warning Arnd Bergmann
2024-03-27  9:54   ` Takashi Iwai [this message]
2024-03-27  0:47 ` [PATCH 0/9] enabled -Wformat-truncation for clang Jakub Kicinski
2024-03-29 19:30 ` patchwork-bot+netdevbpf
2024-04-02  1:48 ` (subset) " Martin K. Petersen

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=87il1880fv.wl-tiwai@suse.de \
    --to=tiwai@suse$(echo .)de \
    --cc=alsa-devel@alsa-project$(echo .)org \
    --cc=arnd@arndb$(echo .)de \
    --cc=arnd@kernel$(echo .)org \
    --cc=johannes@sipsolutions$(echo .)net \
    --cc=justinstitt@google$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-sound@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=llvm@lists$(echo .)linux.dev \
    --cc=morbo@google$(echo .)com \
    --cc=nathan@kernel$(echo .)org \
    --cc=ndesaulniers@google$(echo .)com \
    --cc=perex@perex$(echo .)cz \
    --cc=robh@kernel$(echo .)org \
    --cc=set_pte_at@outlook$(echo .)com \
    --cc=tiwai@suse$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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