|
@@ -2675,6 +2675,13 @@ sub process {
|
|
|
$herecurr);
|
|
|
}
|
|
|
|
|
|
+# check for non-global char *foo[] = {"bar", ...} declarations.
|
|
|
+ if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
|
|
|
+ WARN("STATIC_CONST_CHAR_ARRAY",
|
|
|
+ "char * array declaration might be better as static const\n" .
|
|
|
+ $herecurr);
|
|
|
+ }
|
|
|
+
|
|
|
# check for function declarations without arguments like "int foo()"
|
|
|
if ($line =~ /(\b$Type\s+$Ident)\s*\(\s*\)/) {
|
|
|
if (ERROR("FUNCTION_WITHOUT_ARGS",
|