patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Ferruh Yigit <ferruh.yigit@amd.com>, <dev@dpdk.org>,
	Olivier Matz <olivier.matz@6wind.com>, <stable@dpdk.org>
Subject: Re: [PATCH] examples/cmdline: fix build error with gcc 12
Date: Thu, 19 Jan 2023 18:12:02 +0000	[thread overview]
Message-ID: <Y8mH8n4rTJj5Ohp0@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20230119084441.24bba968@hermes.local>

On Thu, Jan 19, 2023 at 08:44:41AM -0800, Stephen Hemminger wrote:
> On Thu, 19 Jan 2023 08:59:10 +0000
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
> > > >  struct object {
> > > >  	SLIST_ENTRY(object) next;  
> > > 
> > > I confirm it solves the build warning, but what about to get rid of
> > > `OBJ_NAME_LEN_MAX` completely if the intentions is to make size same as
> > > cmdline library array:
> > >   
> > Sure.
> > Another potential fix is just to cast-away [(void)] the return value from
> > strlcpy and allow truncation.
> > 
> > Olivier, as maintainer, what is your preferred fix here?
> > 
> > /Bruce
> 
> Another option would be to use flex-array and not have fixed size.

I think that would add too many other additional complications. At least
using the static array makes the sizes clear and allows the compilers to
warn about possible truncation so we have to explicitly deal with it.

  reply	other threads:[~2023-01-19 18:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 16:11 Bruce Richardson
2023-01-18 18:53 ` Ferruh Yigit
2023-01-19  8:59   ` Bruce Richardson
2023-01-19 16:44     ` Stephen Hemminger
2023-01-19 18:12       ` Bruce Richardson [this message]
2023-02-10 11:26     ` Olivier Matz
2023-02-20 11:44       ` 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=Y8mH8n4rTJj5Ohp0@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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;
as well as URLs for NNTP newsgroup(s).