osmith has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/26/42226/1

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: newchange
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I139bdabb38bd0c9ceda99921ebdc0196850c2a53
Gerrit-Change-Number: 42226
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>

Reply via email to