checkpatch: improve 'bare use of' signed/unsigned types warning
PATCH 54/111 checkpatch: improve 'bare use of' signed/unsigned types warning
From: Joe Perches <[email protected]>
Subject: checkpatch: improve 'bare use of' signed/unsigned types warning
Fix false positive warning of identifiers ending in signed with an = assignment of WARNING: Prefer 'signed int' to bare use of 'signed'.
Link http://lkml.kernel.org/r/6a0e24c3e9102337528ecfcbbe91a0eb5b4820ed.1469529497.git.joe@perches.com open here
Signed-off-by Joe Perches <[email protected]>
Reported-by Alan Douglas <[email protected]>
Acked-by Andy Whitcroft <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-improve-bare-use-of-signed-unsigned-types-warning +1 -1
@@ -3347,7 +3347,7 @@ sub process { next if ($line =~ /^[^\+]/); # check for declarations of signed or unsigned without int - while ($line =~ m{($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) { + while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) { my $type = $1; my $var = $2; $var = "" if (!defined $var);
_