Hi Raphaël,

Do you have a specific example that is failing for this case of braces
detection? I patched checkpatch a while ago in a similar way for
braces around single statement blocks, I don't remember the intention
behind the particular check you are patching.

Thanks,

Christian

On Wed, Nov 13, 2013 at 12:44 AM, Raphaël Beamonte
<[email protected]> wrote:
> The warning about braces that are not necessary for any arm of a statement
> should be interpreted as a warning about braces around single statements.
>
> Signed-off-by: Raphaël Beamonte <[email protected]>
> ---
>  extras/checkpatch.pl |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/extras/checkpatch.pl b/extras/checkpatch.pl
> index fdd8484..5a67704 100755
> --- a/extras/checkpatch.pl
> +++ b/extras/checkpatch.pl
> @@ -3138,7 +3138,7 @@ sub process {
>                                                 $sum_allowed += $_;
>                                         }
>                                         if ($sum_allowed == 0) {
> -                                               WARN("BRACES",
> +                                               WARN("BRACES_SINGLE_STMT",
>                                                      "braces {} are not 
> necessary for any arm of this statement\n" . $herectx);
>                                         } elsif ($sum_allowed != $allow &&
>                                                  $seen != $allow) {
> --
> 1.7.10.4
>
>
> _______________________________________________
> lttng-dev mailing list
> [email protected]
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to