Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sctp: delete the nested flexible array payload

This patch deletes the flexible-array payload[] from the structure
sctp_datahdr to avoid some sparse warnings:

# make C=2 CF="-Wflexible-array-nested" M=./net/sctp/
net/sctp/socket.c: note: in included file (through include/net/sctp/structs.h, include/net/sctp/sctp.h):
./include/linux/sctp.h:230:29: warning: nested flexible array

This member is not even used anywhere.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Xin Long and committed by
David S. Miller
dbda0fba 2ab399a9

+1 -1
+1 -1
include/linux/sctp.h
··· 222 222 __be16 stream; 223 223 __be16 ssn; 224 224 __u32 ppid; 225 - __u8 payload[]; 225 + /* __u8 payload[]; */ 226 226 }; 227 227 228 228 struct sctp_data_chunk {