|
@@ -5422,9 +5422,14 @@ sub process {
|
|
|
|
|
|
# warn about #if 0
|
|
# warn about #if 0
|
|
if ($line =~ /^.\s*\#\s*if\s+0\b/) {
|
|
if ($line =~ /^.\s*\#\s*if\s+0\b/) {
|
|
- CHK("REDUNDANT_CODE",
|
|
|
|
- "if this code is redundant consider removing it\n" .
|
|
|
|
- $herecurr);
|
|
|
|
|
|
+ WARN("IF_0",
|
|
|
|
+ "Consider removing the code enclosed by this #if 0 and its #endif\n" . $herecurr);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+# warn about #if 1
|
|
|
|
+ if ($line =~ /^.\s*\#\s*if\s+1\b/) {
|
|
|
|
+ WARN("IF_1",
|
|
|
|
+ "Consider removing the #if 1 and its #endif\n" . $herecurr);
|
|
}
|
|
}
|
|
|
|
|
|
# check for needless "if (<foo>) fn(<foo>)" uses
|
|
# check for needless "if (<foo>) fn(<foo>)" uses
|