From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 44D13A04DD; Tue, 21 Jan 2020 11:01:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A795343C; Tue, 21 Jan 2020 11:01:55 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id C75002BF5 for ; Tue, 21 Jan 2020 11:01:53 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id a5so2263767wmb.0 for ; Tue, 21 Jan 2020 02:01:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vrSE2DS7qWOAZK/vdPd9JzvPD+D0hqze/QKmADzuMRk=; b=X49UZly5XunC0rQmQuxDCt3zwT4K5YdbEzeZQJkffLdk4WMdLg13Y5PoD5CK57Ktak u/4vCUpDZVfrgHpGOb2J76wGYC981Ft2F+VY5yH7IdJ1MCkXEZ+897SPxouGiXUybPPh logfGkVOBrNtYe3MzyqmNmH13xKyetIfgUTlz0502Ekt6i/DVNkN8ynkFq/w/Q9Fv1w0 yBFeYlQwNjsEB8BjhmD6eZxC1ZvPAg4hCxfLuHlmAMqFzExd9vJMLZ8lm/i7Ho4l/R/z h/LEWmbqdbBrYqjv72bHxK+uksaZli1GJilzL0yFhKHC3DB8/qUgPdxzROQQF1ZNRL20 ki6Q== X-Gm-Message-State: APjAAAXhWpYnTbzX8SmHXZTONsoOhgLCu8FXlgZnyO7VYhyya2ODhI/f v9wVr3uz/+NwIuMMkTGwwtY= X-Google-Smtp-Source: APXvYqwNi7pdPpG/nA55dkwiJyS8HpYVRLxiMlTJbZfaUDPf16Mlkbkt9G21TYipygL9VzhdaXXKig== X-Received: by 2002:a7b:c19a:: with SMTP id y26mr3699123wmi.152.1579600913502; Tue, 21 Jan 2020 02:01:53 -0800 (PST) Received: from [192.168.1.109] (host158-32-dynamic.53-79-r.retail.telecomitalia.it. [79.53.32.158]) by smtp.gmail.com with ESMTPSA id q3sm3060689wmj.38.2020.01.21.02.01.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jan 2020 02:01:52 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) From: Alfredo Cardigliano In-Reply-To: <20200121095802.3942052-1-ferruh.yigit@intel.com> Date: Tue, 21 Jan 2020 11:01:51 +0100 Cc: dev@dpdk.org, Anoob Joseph , Raslan Darawsheh , Xueming Zhang Content-Transfer-Encoding: quoted-printable Message-Id: <442B0C2E-A122-40C2-AA90-9F87E125557A@ntop.org> References: <20200121094143.1904095-1-ferruh.yigit@intel.com> <20200121095802.3942052-1-ferruh.yigit@intel.com> To: Ferruh Yigit X-Mailer: Apple Mail (2.3608.40.2.2.4) Subject: Re: [dpdk-dev] [PATCH v2] net/ionic: ignore missing field initializers warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > On 21 Jan 2020, at 10:58, Ferruh Yigit wrote: >=20 > The compiler warning is: > from .../drivers/net/ionic/ionic_dev.c:7: > .../drivers/net/ionic/ionic_if.h:202:5: note: =E2=80=98rsvd=E2=80=99 = declared here > u8 rsvd[62]; > ^ >=20 > This has been observed with gcc 4.8.5, newer 9+ compiler are not = giving > this warning. >=20 > 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. >=20 > Adding '-Wno-missing-field-initializers' compiler flag to disable the > warning. >=20 > Reported-by: Anoob Joseph > Reported-by: Raslan Darawsheh > Reported-by: Xueming Zhang > Signed-off-by: Ferruh Yigit > --- > v2: > * add flag to ionic_lif.c too > --- > drivers/net/ionic/Makefile | 3 +++ > drivers/net/ionic/meson.build | 9 +++++++++ > 2 files changed, 12 insertions(+) >=20 > diff --git a/drivers/net/ionic/Makefile b/drivers/net/ionic/Makefile > index f74ac2d34..bfbe15e27 100644 > --- a/drivers/net/ionic/Makefile > +++ b/drivers/net/ionic/Makefile > @@ -31,4 +31,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) +=3D = ionic_ethdev.c > SRCS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) +=3D ionic_lif.c > SRCS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) +=3D ionic_main.c >=20 > +CFLAGS_ionic_dev.o +=3D -Wno-missing-field-initializers > +CFLAGS_ionic_lif.o +=3D -Wno-missing-field-initializers > + > include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/drivers/net/ionic/meson.build = b/drivers/net/ionic/meson.build > index dee8a3608..06b776018 100644 > --- a/drivers/net/ionic/meson.build > +++ b/drivers/net/ionic/meson.build > @@ -11,3 +11,12 @@ sources =3D files( > 'ionic_main.c' > ) >=20 > +error_cflags =3D [ > + '-Wno-missing-field-initializers', > +] > + > +foreach flag: error_cflags > + if cc.has_argument(flag) > + c_args +=3D flag > + endif > +endforeach > --=20 > 2.24.1 This looks good to me. Alfredo