linux-stable/net/phonet
Arnd Bergmann b0f38ebe05 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 14:35:16 +01: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
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +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-03-23 14:35:16 +01:00
pn_dev.c netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
pn_netlink.c rtnetlink: make rtnl_register accept a flags parameter 2017-08-09 16:57:38 -07:00
socket.c net: convert sock.sk_refcnt from atomic_t to refcount_t 2017-07-01 07:39:08 -07:00
sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00