[PATCH 6/7] enic: replace zero length array with flex array

John Daley (johndale) johndale at cisco.com
Sat Jan 14 02:12:54 CET 2023


Acked-by: John Daley <johndale at cisco.com>

From: Stephen Hemminger <stephen at networkplumber.org>
Date: Friday, January 13, 2023 at 1:52 PM
To: dev at dpdk.org <dev at dpdk.org>
Cc: Stephen Hemminger <stephen at networkplumber.org>, John Daley (johndale) <johndale at cisco.com>, Hyong Youb Kim (hyonkim) <hyonkim at cisco.com>
Subject: [PATCH 6/7] enic: replace zero length array with flex array
Zero length arrays are GNU extension. Replace with
standard flex array.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/enic/base/vnic_devcmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/enic/base/vnic_devcmd.h b/drivers/net/enic/base/vnic_devcmd.h
index 253a791c3f65..f91cc3078d63 100644
--- a/drivers/net/enic/base/vnic_devcmd.h
+++ b/drivers/net/enic/base/vnic_devcmd.h
@@ -765,7 +765,7 @@ struct vnic_devcmd_notify {
 struct vnic_devcmd_provinfo {
         uint8_t oui[3];
         uint8_t type;
-       uint8_t data[0];
+       uint8_t data[];
 };

 /*
--
2.39.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20230114/8d8990db/attachment.htm>


More information about the dev mailing list