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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 30 Dec 2020 10:52:23 -0800
From:   Joe Perches <joe@...ches.com>
To:     Jan Schlien <list.lkml@...-o-sch.net>,
        Andy Whitcroft <apw@...onical.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [BUG] checkpatch: non-standard types cannot be declared after
 '}'

On Wed, 2020-12-30 at 14:36 +0100, Jan Schlien wrote:
> Hi,
> 
> I found some odd behavior of checkpatch.pl, which I'm currently using
> for own projects outside the kernel, but I verified that kernel patches
> can be affected as well.

Hello Jan.

I've had this patch locally for awhile that I believe fixes this
and another issue ($stat blocks can start with a close brace).

I've been waiting for Andy to review it in case there's some other
parsing problem associated with it.
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 00085308ed9d..012c8dc6cb1a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1555,7 +1555,7 @@ sub ctx_statement_block {
 
 		# Statement ends at the ';' or a close '}' at the
 		# outermost level.
-		if ($level == 0 && $c eq ';') {
+		if ($level == 0 && ($c eq ';' || $c eq '}')) {
 			last;
 		}
 

Powered by blists - more mailing lists