[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] kdd: remove zero-length arrays


  • To: Olaf Hering <olaf@xxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Tue, 9 Jun 2020 14:26:46 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Tim Deegan <tim@xxxxxxx>, 'Ian Jackson' <ian.jackson@xxxxxxxxxxxxx>, 'Wei Liu' <wl@xxxxxxx>, paul@xxxxxxx
  • Delivery-date: Tue, 09 Jun 2020 13:26:58 +0000
  • Ironport-sdr: LCT9xGyJWNUMkOsK8scVAC77zhZRyjblAyL9jMY2o4zI81gawD1L3V8kTms5PFmbSoN/SsSdFv 96jyIzKnoMJEhHaPebl5vxcOgN2TDgW+jP9tIFBwmYpS35s81jnLMFWOi1oGl/NePHdD8VMjbi 40KhR7dCPaILve+pVezZpIIGckKIcTaBd2VxJB5GraGllQ0DPFv9moWmdstYmb8PwgmgTqFJCx roHV+Huc0lI9zDLT+A0nIJ0nLNrGOTtinCTPSNsexzBW0KihuOT+o8+bnRy6shJ07KJMudWBEX 5Fg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Olaf Hering writes ("Re: [PATCH v1] kdd: remove zero-length arrays"):
> Am Tue, 9 Jun 2020 13:15:49 +0100
> schrieb Tim Deegan <tim@xxxxxxx>:
> 
> > Olaf, can you try dropping the 'payload' field from the header and 
> > replacing the payload[0] in pkt with payload[] ?
> 
> In file included from kdd.c:53:
> kdd.h:325:17: error: flexible array member in union
>   325 |         uint8_t payload[];
...
>          kdd_stc stc;
> -        uint8_t payload[0];
> +        uint8_t payload[];
>      };
>  } PACKED kdd_pkt;

Try

>          kdd_stc stc;
> -        uint8_t payload[0];
>      };
  +    uint8_t payload[];
>  } PACKED kdd_pkt;

?

(I haven't read the surrounding code...)

Ian.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.