[PATCH v4 10/10] common/dpaxx: remove zero length array
Tyler Retzlaff
roretzla at linux.microsoft.com
Tue Nov 21 18:18:37 CET 2023
On Tue, Nov 21, 2023 at 08:46:41AM -0800, Stephen Hemminger wrote:
> On Tue, 21 Nov 2023 10:49:59 +0000
> Hemant Agrawal <hemant.agrawal at nxp.com> wrote:
>
> > > struct ipsec_encap_pdb {
> > > uint32_t options;
> > > @@ -350,7 +349,6 @@ struct ipsec_encap_pdb {
> > > };
> > > uint32_t spi;
> > > uint32_t ip_hdr_len;
> > > - uint8_t ip_hdr[0];
> > [Hemant] This should be replaced with
> > uint8_t ip_hdr[];
> > > };
> > >
>
> That won't work because the structure is embedded in
> another struct and then clang will correctly report an error.
Hemant if the field is not referenced what's the harm in removing it?
More information about the dev
mailing list