From: Stephen Hemminger <stephen@networkplumber.org>
To: Kevin Traynor <ktraynor@redhat.com>
Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com,
stable@dpdk.org, Anatoly Burakov <anatoly.burakov@intel.com>,
David Hunt <david.hunt@intel.com>,
Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Subject: Re: [PATCH] examples/vm_power: fix format-truncation warning
Date: Wed, 25 Feb 2026 10:32:51 -0800 [thread overview]
Message-ID: <20260225103251.37c715f4@phoenix.local> (raw)
In-Reply-To: <20260225173632.283928-1-ktraynor@redhat.com>
On Wed, 25 Feb 2026 17:36:32 +0000
Kevin Traynor <ktraynor@redhat.com> wrote:
> Without libbsd-devel strlcpy is defined as rte_strlcpy and a warning is
> raised for format-truncation. Observed with gcc 15.2.1.
>
> In function ‘rte_strlcpy’,
> inlined from ‘add_host_channels’ at
> ../examples/vm_power_manager/channel_manager.c:600:3:
> ../lib/eal/include/rte_string_fns.h:63:24:
> warning: ‘%s’ directive output may be truncated writing up to
> 4095 bytes into a region of size 108 [-Wformat-truncation=]
> 63 | return (size_t)snprintf(dst, size, "%s", src);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Check for truncation of socket_path[4096] into channel_path[108] to
> remove warning.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Since socket_path is a unix domain socket path.
It should be UNIX_PATH_MAX (108) not PATH_MAX (4096)
next prev parent reply other threads:[~2026-02-25 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 17:36 [PATCH] examples/vm_power: fix format-truncation warning Kevin Traynor
2026-02-25 18:32 ` Stephen Hemminger [this message]
2026-02-26 10:48 ` Kevin Traynor
2026-03-17 16:26 ` Thomas Monjalon
2026-03-17 16:20 ` Thomas Monjalon
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=20260225103251.37c715f4@phoenix.local \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.com \
--cc=david.hunt@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ktraynor@redhat.com \
--cc=sivaprasad.tummala@amd.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.