mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
checkpatch: do not report nr_static as a static declaration
Ensure we do not report identifiers containing the word static as static declarations. For example this should not be reported as an unecessary assignement of 0: long nr_static = 0; Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4635f4fbaf
commit
2d1bafd799
1 changed files with 1 additions and 1 deletions
|
@ -1632,7 +1632,7 @@ sub process {
|
|||
$herecurr);
|
||||
}
|
||||
# check for static initialisers.
|
||||
if ($line =~ /\s*static\s.*=\s*(0|NULL|false)\s*;/) {
|
||||
if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) {
|
||||
ERROR("do not initialise statics to 0 or NULL\n" .
|
||||
$herecurr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue