linux-sg2042/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
..
Kconfig Phonet: kill the ST-Ericsson pipe controller Kconfig 2011-03-09 11:59:33 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
af_phonet.c net: phonet: mark phonet_protocol as const 2017-10-07 23:15:08 +01:00
datagram.c net: phonet: mark phonet_protocol as const 2017-10-07 23:15:08 +01:00
pep-gprs.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
pep.c phonet: fix building with clang 2019-02-21 16:23:56 -08:00
pn_dev.c proc: introduce proc_create_net{,_data} 2018-05-16 07:24:30 +02:00
pn_netlink.c net: use rtnl_register_module where needed 2017-12-04 11:32:39 -05:00
socket.c Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL 2018-06-28 10:40:47 -07:00
sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00