]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
print_category: printf %*s needs an int argument
authorDaniel Stenberg <daniel@haxx.se>
Thu, 7 Oct 2021 08:13:41 +0000 (10:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 7 Oct 2021 09:15:12 +0000 (11:15 +0200)
... not a size_t!

Detected by Coverity: CID 1492331.
Closes #7823

src/tool_help.c

index d4c21ff6e3d4d8612fa381be385dfa2852e7a756..d49cccd0582d6b63924d15863919c9e9aedd3986 100644 (file)
@@ -134,7 +134,7 @@ static void print_category(curlhelp_t category)
 
   for(i = 0; helptext[i].opt; ++i)
     if(helptext[i].categories & category) {
-      printf(" %-*s %s\n", longopt, helptext[i].opt, helptext[i].desc);
+      printf(" %-*s %s\n", (int)longopt, helptext[i].opt, helptext[i].desc);
     }
 }