|
@@ -6251,6 +6251,12 @@ sub process {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+# check for bool bitfields
|
|
|
|
+ if ($sline =~ /^.\s+bool\s*$Ident\s*:\s*\d+\s*;/) {
|
|
|
|
+ WARN("BOOL_BITFIELD",
|
|
|
|
+ "Avoid using bool as bitfield. Prefer bool bitfields as unsigned int or u<8|16|32>\n" . $herecurr);
|
|
|
|
+ }
|
|
|
|
+
|
|
# check for semaphores initialized locked
|
|
# check for semaphores initialized locked
|
|
if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
|
|
if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
|
|
WARN("CONSIDER_COMPLETION",
|
|
WARN("CONSIDER_COMPLETION",
|