net/ionic: ignore missing field initializers warning
authorFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jan 2020 09:58:01 +0000 (09:58 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 21 Jan 2020 13:41:58 +0000 (14:41 +0100)
commit52f0e9c136d7f5acf8dd1991d9644ed0fa28888e
treee0ea9d55fdce8832cd62a5c702729cc91912c281
parentf061f23bcaa619209b9180f8720a128bd719e95b
net/ionic: ignore missing field initializers warning

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>
drivers/net/ionic/Makefile
drivers/net/ionic/meson.build