Skip to content
Commit d1ed336b authored by Flavio Ceolin's avatar Flavio Ceolin Committed by Anas Nashif
Browse files

kernel: Do not use zero-length array



Zero length array is a GNU extension that works as an header for a
variable length object. The portable solution for this is using
flexible length array, but this can be used only in the end of a
struct declaration and this is violates MISRA-C rule 18.8.

The easiest way to rif of this is make the macro expand to nothing but
then we will have a trailing semicolon that is not allowed in C99. So
the macro was changed to automatically add the semicolon when needed.
This may break code identation in some editors but it is a fair price
to pay to have portability and compliance.

Signed-off-by: default avatarFlavio Ceolin <flavio.ceolin@intel.com>
parent c9a9e0a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment