Files
linux/include/net
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
..
2017-07-11 06:08:58 -04:00
2018-09-29 03:06:01 -07:00
2019-03-23 14:35:16 +01:00
2018-12-17 09:28:47 +01:00
2019-02-23 09:06:44 +01:00
2018-10-18 09:16:17 +02:00
2016-07-08 12:20:57 +02:00
2016-04-25 16:44:27 -04:00
2016-04-25 16:44:27 -04:00
2015-03-06 21:50:02 -05:00
2017-08-31 14:42:19 -07:00
2019-03-13 14:03:09 -07:00
2017-06-15 12:12:40 -04:00
2019-03-13 14:03:09 -07:00
2018-09-19 22:43:46 +02:00
2016-08-17 19:36:23 -04:00
2016-10-03 02:00:22 -04:00
2018-05-16 10:10:23 +02:00
2016-07-08 12:20:57 +02:00
2016-03-23 22:09:58 -04:00
2018-02-25 11:07:59 +01:00
2019-01-09 17:14:46 +01:00
2015-03-12 22:58:12 -04:00