← Commit list

9f25dcea55

Daniel Stenberg
Daniel Stenberg
2026-06-15
SUCCESS Duration: 177s

Subject

checksrc: detect and warn for (void)!

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

scripts/checksrc.pl+7 -0
@@ -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,