]> Git Repo - linux.git/blobdiff - scripts/checkpatch.pl
Merge tag 'cris-for-linus-3.7' of git://jni.nu/cris
[linux.git] / scripts / checkpatch.pl
index 913d6bdfdda3ecb44f521af79980019d5a531399..ca05ba217f5fd4038bcc511adff8a5b95823fb3e 100755 (executable)
@@ -3016,7 +3016,8 @@ sub process {
                                        $herectx .= raw_line($linenr, $n) . "\n";
                                }
 
-                               if (($stmts =~ tr/;/;/) == 1) {
+                               if (($stmts =~ tr/;/;/) == 1 &&
+                                   $stmts !~ /^\s*(if|while|for|switch)\b/) {
                                        WARN("SINGLE_STATEMENT_DO_WHILE_MACRO",
                                             "Single statement macros should not use a do {} while (0) loop\n" . "$herectx");
                                }
This page took 0.035512 seconds and 4 git commands to generate.