]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* support/ab.c (main): Check apr_getopt() returned APR_EOF, fixing clang
authorJoe Orton <jorton@apache.org>
Fri, 3 Dec 2021 16:40:18 +0000 (16:40 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 3 Dec 2021 16:40:18 +0000 (16:40 +0000)
 warning:

support/ab.c:2343:13: warning[deadcode.DeadStores]: Although the value stored to 'status' is used in the enclosing expression, the value is never actually read from 'status'

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895559 13f79535-47bb-0310-9956-ffa450edef68

support/ab.c

index f4a68662f64ffda495e73a1a5d6415d7fbaeb5de..55d1e4bb88a470f2b2691595d84d8f5eb8fe8a4c 100644 (file)
@@ -2592,8 +2592,8 @@ int main(int argc, const char * const argv[])
         }
     }
 
-    if (opt->ind != argc - 1) {
-        fprintf(stderr, "%s: wrong number of arguments\n", argv[0]);
+    if (status != APR_EOF || opt->ind != argc - 1) {
+        fprintf(stderr, "%s: Invalid or missing arguments\n", argv[0]);
         usage(argv[0]);
     }