|
@@ -2743,6 +2743,11 @@ sub process {
|
|
|
WARN("plain inline is preferred over $1\n" . $herecurr);
|
|
|
}
|
|
|
|
|
|
+# Check for __attribute__ packed, prefer __packed
|
|
|
+ if ($line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
|
|
|
+ WARN("__packed is preferred over __attribute__((packed))\n" . $herecurr);
|
|
|
+ }
|
|
|
+
|
|
|
# check for sizeof(&)
|
|
|
if ($line =~ /\bsizeof\s*\(\s*\&/) {
|
|
|
WARN("sizeof(& should be avoided\n" . $herecurr);
|