mirror of
https://github.com/curl/curl.git
synced 2026-06-18 07:45:38 +03:00
checksrc: detect and warn for (void)!
It's plain weird. Don't do it. Closes #22023
This commit is contained in:
parent
b0d733e143
commit
9f25dcea55
1 changed files with 7 additions and 0 deletions
|
|
@ -202,6 +202,7 @@ my %warnings = (
|
|||
'TYPEDEFSTRUCT' => 'typedefed struct',
|
||||
'UNUSEDIGNORE' => 'a warning ignore was not used',
|
||||
'USESAFEFREE' => 'replace curlx_free() + NULL assignment with curlx_safefree()',
|
||||
'VOIDEXCL' => '(void)! is not something we like',
|
||||
);
|
||||
|
||||
sub readskiplist {
|
||||
|
|
@ -1165,6 +1166,12 @@ sub scanfile {
|
|||
"space after exclamation mark");
|
||||
}
|
||||
|
||||
if($nostr =~ /(.*)\(void\)\!/) {
|
||||
checkwarn("VOIDEXCL",
|
||||
$line, length($1)+1, $file, $ol,
|
||||
"exclamation after (void) is weird");
|
||||
}
|
||||
|
||||
if($nostr =~ /(.*)\b(EACCES|EADDRINUSE|EADDRNOTAVAIL|EAFNOSUPPORT|EBADF|ECONNREFUSED|ECONNRESET|EINPROGRESS|EINTR|EINVAL|EISCONN|EMSGSIZE|ENOMEM|ETIMEDOUT|EWOULDBLOCK)\b/) {
|
||||
checkwarn("ERRNOVAR",
|
||||
$line, length($1), $file, $ol,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue