|
@@ -1869,6 +1869,18 @@ sub process {
|
|
$herecurr);
|
|
$herecurr);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+# check for static const char * arrays.
|
|
|
|
+ if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
|
|
|
|
+ WARN("static const char * array should probably be static const char * const\n" .
|
|
|
|
+ $herecurr);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+# check for static char foo[] = "bar" declarations.
|
|
|
|
+ if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
|
|
|
|
+ WARN("static char array declaration should probably be static const char\n" .
|
|
|
|
+ $herecurr);
|
|
|
|
+ }
|
|
|
|
+
|
|
# check for new typedefs, only function parameters and sparse annotations
|
|
# check for new typedefs, only function parameters and sparse annotations
|
|
# make sense.
|
|
# make sense.
|
|
if ($line =~ /\btypedef\s/ &&
|
|
if ($line =~ /\btypedef\s/ &&
|