linux-brain/net/phonet
Arnd Bergmann 3dc60d493b phonet: fix building with clang
[ Upstream commit 6321aa1975 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-23 13:19:44 +01:00
..
Kconfig Phonet: kill the ST-Ericsson pipe controller Kconfig 2011-03-09 11:59:33 -08:00
Makefile Net: phonet: Makefile: Remove deprecated kbuild goal definitions 2010-11-22 08:16:14 -08:00
af_phonet.c phonet: properly unshare skbs in phonet_rcv() 2016-01-12 12:05:38 -05:00
datagram.c net: Remove iocb argument from sendmsg and recvmsg 2015-03-02 13:06:31 -05:00
pep-gprs.c net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited 2014-11-11 14:10:31 -05:00
pep.c phonet: fix building with clang 2019-03-23 13:19:44 +01:00
pn_dev.c net: fix rcu access on phonet_routes 2014-10-06 18:16:30 -04:00
pn_netlink.c phonet netlink: allow multiple messages per skb in route dump 2015-01-19 16:20:17 -05:00
socket.c sock: struct proto hash function may error 2016-02-11 03:54:14 -05:00
sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00