lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 2 May 2012 11:10:46 -0400
From:	Joe Korty <joe.korty@...r.com>
To:	Andy Whitcroft <apw@...onical.com>
Cc:	joe.korty@...r.com, linux-kernel@...r.kernel.org
Subject: checkpatch: forward declarations fix

Allow forward declarations of the form:

	struct file_operations;

to exist without requiring the preceeding 'const'. In
any case C does not allow 'const' on forward declarations.

Signed-off-by: Joe Korty <joe.korty@...r.com>

Index: linux/scripts/checkpatch.pl
===================================================================
--- linux.orig/scripts/checkpatch.pl	2012-05-02 10:29:03.000000000 -0400
+++ linux/scripts/checkpatch.pl	2012-05-02 10:38:45.000000000 -0400
@@ -3411,9 +3411,11 @@
 				wd_ops}x;
 		if ($line !~ /\bconst\b/ &&
 		    $line =~ /\bstruct\s+($struct_ops)\b/) {
-			WARN("CONST_STRUCT",
-			     "struct $1 should normally be const\n" .
-				$herecurr);
+			if ($line !~ /struct\s+($struct_ops);/) {
+				WARN("CONST_STRUCT",
+				     "struct $1 should normally be const\n" .
+					$herecurr);
+			}
 		}
 
 # use of NR_CPUS is usually wrong
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ