On Sun, 24 May 2020 19:30:07 +0200
Thomas Monjalon <tho...@monjalon.net> wrote:

> Some compilers raise an error when declaring a variable
> in the middle of a function. This is a C99 allowance.
> Even if DPDK switches globally to C99 or C11 standard,
> the coding rules are for declarations at the beginning
> of a block:
> http://doc.dpdk.org/guides/contributing/coding_style.html#local-variables
> 
> This coding style is enforced by adding a check of
> the common patterns like "for (int i;"
> 
> The occurrences of the checked pattern are fixed:
>       'for *(\(char\|u\?int\|unsigned\|s\?size_t\)'
> In the file dpaa2_sparser.c, the fix is to remove the unused macros.
> 
> Signed-off-by: Thomas Monjalon <tho...@monjalon.net>

Surprised that checkpatch doesn't enforce this already.
Or maybe kernel flags are different.

Reply via email to