Re: [BUG] checkpatch: unescaped left brace in regex is deprecated

From: Geyslan G. Bem
Date: Wed Dec 30 2015 - 10:52:12 EST


2015-12-16 8:21 GMT-03:00 Geyslan G. Bem <geyslan@xxxxxxxxx>:
> 2015-12-15 21:13 GMT-03:00 Joe Perches <joe@xxxxxxxxxxx>:
>> On Tue, 2015-12-15 at 20:58 -0300, Geyslan G. Bem wrote:
>>> 2015-12-10 8:24 GMT-03:00 Geyslan G. Bem <geyslan@xxxxxxxxx>:
>>> > Suggested-by: Peter Senna Tschudin <peter.senna@xxxxxxxxx>
>>> > Reported-by: Geyslan G. Bem <geyslan@xxxxxxxxx>
>>> >
>>>
>>> Joe, do you applied this patch? If not, would I send it?
>>
>> You can resend, but I believe there are a few more instances
>> of this that might need fixing too.
Only one regex from that list triggered the warning. Patch sent.

>>
>> I don't have perl 5.22 so it's difficult for me to test.
>>
>> Here's a grep with some possible false positives
>> and maybe missing some too.
> Ok, I'll try to trigger them before make the patch.
>
>>
>> $ git grep -n "=[\!~].*{" scripts/checkpatch.pl|grep -vw qr|grep -vP '{$|{\s*#|\${|\\{|{[\d$]'
>> scripts/checkpatch.pl:1143: $remainder =~ /^(else)(?:\s|{)/ &&
>> scripts/checkpatch.pl:1233: $stmt =~ s/^\s*{//;
>> scripts/checkpatch.pl:2458: if ($file =~ m{^(.*?)(?::\d+)+:?$} &&
>> scripts/checkpatch.pl:2802: if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
>> scripts/checkpatch.pl:3015: $s =~ s/{.*$//s;
>> scripts/checkpatch.pl:3168: $s =~ s/^\s*{//;
>> scripts/checkpatch.pl:3274: if ($line =~ /^.\s*{/ &&
>> scripts/checkpatch.pl:3282: $fixedline =~ s/\s*=\s*$/ = {/;
>> scripts/checkpatch.pl:3285: $fixedline =~ s/^(.\s*){\s*/$1/;
>> scripts/checkpatch.pl:3606: if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
>> scripts/checkpatch.pl:3613: $fixed_line =~ /(^..*$Type\s*$Ident\(.*\)\s*){(.*)$/;
>> scripts/checkpatch.pl:3625: if ($line =~ /^.\s*{/ &&
>> scripts/checkpatch.pl:3635: $fixedline =~ s/^(.\s*){\s*/$1\t/;
>> scripts/checkpatch.pl:4104:## if ($line =~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Ident.*/ &&
>> scripts/checkpatch.pl:4124: $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/;
>> scripts/checkpatch.pl:4734: $seen++ if ($block =~ /^\s*{/);
>>
>
>
>
> --
> Regards,
>
> Geyslan G. Bem
> hackingbits.com



--
Regards,

Geyslan G. Bem
hackingbits.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/