checksrc: detect and warn for (void)!
No binary (build failed)
—
(log yok)
| @@ -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, | |