WSL2-Linux-Kernel/include/net/phonet
Arnd Bergmann 6321aa1975 phonet: fix building with clang
clang warns about overflowing the data[] member in the struct pnpipehdr:

net/phonet/pep.c:295:8: warning: array index 4 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        if (hdr->data[4] == PEP_IND_READY)
                            ^         ~
include/net/phonet/pep.h:66:3: note: array 'data' declared here
                u8              data[1];

Using a flexible array member at the end of the struct avoids the
warning, but since we cannot have a flexible array member inside
of the union, each index now has to be moved back by one, which
makes it a little uglier.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-21 16:23:56 -08:00
..
gprs.h net: remove my future former mail address 2012-06-17 16:29:38 -07:00
pep.h phonet: fix building with clang 2019-02-21 16:23:56 -08:00
phonet.h net: phonet: mark phonet_protocol as const 2017-10-07 23:15:08 +01:00
pn_dev.h proc: introduce proc_create_net{,_data} 2018-05-16 07:24:30 +02:00