The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Lucy Mielke <lucymielke@icloud.com>
Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: fix -Wformat-truncation in create_worker
Date: Thu, 12 Oct 2023 09:53:56 -1000	[thread overview]
Message-ID: <ZShO1HOVI8WkxziA@slm.duckdns.org> (raw)
In-Reply-To: <ZSQz2if1dYelUdzE@fedora.fritz.box>

On Mon, Oct 09, 2023 at 07:09:46PM +0200, Lucy Mielke wrote:
> Compiling with W=1 emitted the following warning
> (Compiler: gcc (x86-64, ver. 13.2.1, .config: result of make allyesconfig,
> "Treat warnings as errors" turned off):
> 
> kernel/workqueue.c:2188:54: warning: ‘%d’ directive output may be
> 	truncated writing between 1 and 10 bytes into a region of size
> 	between 5 and 14 [-Wformat-truncation=]
> kernel/workqueue.c:2188:50: note: directive argument in the range
> 	[0, 2147483647]
> kernel/workqueue.c:2188:17: note: ‘snprintf’ output between 4 and 23 bytes
> 	into a destination of size 16
> 
> setting "id_buf" to size 23 will silence the warning, since GCC
> determines snprintf's output to be max. 23 bytes in line 2188.
> 
> Please let me know if there are any mistakes in my patch!
> 
> Signed-off-by: Lucy Mielke <lucymielke@icloud.com>

Applied to wq/for-6.6-fixes.

Thanks.

-- 
tejun

      reply	other threads:[~2023-10-12 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 17:09 [PATCH] workqueue: fix -Wformat-truncation in create_worker Lucy Mielke
2023-10-12 19:53 ` Tejun Heo [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=ZShO1HOVI8WkxziA@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucymielke@icloud.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