Olaf Hering writes ("Re: [PATCH v1] kdd: remove zero-length arrays"): > Am Tue, 9 Jun 2020 13:15:49 +0100 > schrieb Tim Deegan <t...@xen.org>: > > > 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.