Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e7ee270 authored by David Rientjes's avatar David Rientjes Committed by Linus Torvalds
Browse files

flex_array: declare parts member to have incomplete type



The `parts' member of struct flex_array should evaluate to an incomplete
type so that sizeof() cannot be used and C99 does not require the
zero-length specification.

Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
Acked-by: default avatarDave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 105b6e8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ struct flex_array {
		struct {
			int element_size;
			int total_nr_elements;
			struct flex_array_part *parts[0];
			struct flex_array_part *parts[];
		};
		/*
		 * This little trick makes sure that