Skip to content
Snippets Groups Projects
Commit 7b36c139 authored by Denis Efremov's avatar Denis Efremov Committed by Julia Lawall
Browse files

coccinelle: misc: add flexible_array.cocci script


One-element and zero-length arrays are deprecated [1]. Kernel
code should always use "flexible array members" instead, except
for existing uapi definitions.

The script warns about one-element and zero-length arrays in structs.

[1] commit 68e4cd17 ("docs: deprecated.rst: Add zero-length and
    one-element arrays")

Cc: Kees Cook <keescook@chromium.org>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
Signed-off-by: default avatarJulia Lawall <julia.lawall@inria.fr>
parent 44d8870f
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment