osmith submitted this change.

View Change

Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve
lint/checkpatch: fix false FUNCTION_ARGUMENTS

Fix that the linter complains about:
WARNING:FUNCTION_ARGUMENTS: function definition argument 'void' should also have an identifier name

For functions with attributes at the end, e.g.:
void Fallback_Handler(void) __attribute__((weak, alias("Dummy_Handler")));

Related: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42224/comment/7c5b3be0_6ff61090/
Change-Id: I139bdabb38bd0c9ceda99921ebdc0196850c2a53
---
M lint/checkpatch/checkpatch.pl
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl
index eada2a9..9a81dc2 100755
--- a/lint/checkpatch/checkpatch.pl
+++ b/lint/checkpatch/checkpatch.pl
@@ -6964,7 +6964,8 @@
# check for function declarations that have arguments without identifier names
if (defined $stat &&
$stat =~ /^.\s*(?:extern\s+)?$Type\s*(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*\(\s*([^{]+)\s*\)\s*;/s &&
- $1 ne "void") {
+ $1 ne "void" &&
+ $1 !~ /^void\)/) {
my $args = trim($1);
while ($args =~ m/\s*($Type\s*(?:$Ident|\(\s*\*\s*$Ident?\s*\)\s*$balanced_parens)?)/g) {
my $arg = trim($1);

To view, visit change 42226. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I139bdabb38bd0c9ceda99921ebdc0196850c2a53
Gerrit-Change-Number: 42226
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>