osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ci/+/42226?usp=email )
Change subject: lint/checkpatch: fix false FUNCTION_ARGUMENTS
......................................................................
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(-)
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
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 https://gerrit.osmocom.org/c/osmo-ci/+/42226?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I139bdabb38bd0c9ceda99921ebdc0196850c2a53
Gerrit-Change-Number: 42226
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: lynxis lazus <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>