DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Anoob Joseph <anoobj@marvell.com>,
	Raslan Darawsheh <rasland@mellanox.com>,
	Xueming Zhang <xuemingx.zhang@intel.com>,
	Alfredo Cardigliano <cardigliano@ntop.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/ionic: ignore missing field initializers warning
Date: Tue, 21 Jan 2020 14:39:45 +0100	[thread overview]
Message-ID: <1850721.kfQNDG1tbD@xps> (raw)
In-Reply-To: <442B0C2E-A122-40C2-AA90-9F87E125557A@ntop.org>

21/01/2020 11:01, Alfredo Cardigliano:
> 
> > On 21 Jan 2020, at 10:58, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> > 
> > The compiler warning is:
> >   from .../drivers/net/ionic/ionic_dev.c:7:
> > .../drivers/net/ionic/ionic_if.h:202:5: note: ‘rsvd’ declared here
> >  u8 rsvd[62];
> >     ^
> > 
> > This has been observed with gcc 4.8.5, newer 9+ compiler are not giving
> > this warning.
> > 
> > Warning is a reminder to the user that there are some fields in the
> > struct not initialized with the default value.
> > But the C standard clarifies that in that case the field value will be
> > zero and code is aware of this behavior, so no initializing to a default
> > value is intentional and it is safe to ignore this compiler warning.
> > 
> > Adding '-Wno-missing-field-initializers' compiler flag to disable the
> > warning.
> > 
> > Reported-by: Anoob Joseph <anoobj@marvell.com>
> > Reported-by: Raslan Darawsheh <rasland@mellanox.com>
> > Reported-by: Xueming Zhang <xuemingx.zhang@intel.com>
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > ---
> > v2:
> > * add flag to ionic_lif.c too
> > ---
> > drivers/net/ionic/Makefile    | 3 +++
> > drivers/net/ionic/meson.build | 9 +++++++++
> > 2 files changed, 12 insertions(+)
[...]
> This looks good to me.

Applied, thanks




      reply	other threads:[~2020-01-21 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21  9:41 [dpdk-dev] [PATCH] " Ferruh Yigit
2020-01-21  9:58 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2020-01-21 10:01   ` Alfredo Cardigliano
2020-01-21 13:39     ` Thomas Monjalon [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=1850721.kfQNDG1tbD@xps \
    --to=thomas@monjalon.net \
    --cc=anoobj@marvell.com \
    --cc=cardigliano@ntop.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=rasland@mellanox.com \
    --cc=xuemingx.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).