]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
x509asn1: mark msnprintf return as unchecked
authorDaniel Gustafsson <daniel@yesql.se>
Wed, 11 May 2022 08:38:08 +0000 (10:38 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Wed, 11 May 2022 08:38:08 +0000 (10:38 +0200)
We have lots of unchecked msnprintf calls, and this particular msnprintf
call isn't more interesting than the others, but this one yields a Coverity
warning so let's implicitly silence it. Going over the other invocations
is probably a worthwhile project, but for now let's keep the static
analyzers happy.

Closes: #8831
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
lib/vtls/x509asn1.c

index dfb938621c0edc7cde5f741c0ab18adae7e82fde..d6ee51250be6397e8dc4df0dca7d55602b863fb1 100644 (file)
@@ -956,7 +956,7 @@ static int do_pubkey(struct Curl_easy *data, int certnum,
       infof(data, "   ECC Public Key (%lu bits)", len);
     if(data->set.ssl.certinfo) {
       char q[sizeof(len) * 8 / 3 + 1];
-      msnprintf(q, sizeof(q), "%lu", len);
+      (void)msnprintf(q, sizeof(q), "%lu", len);
       if(Curl_ssl_push_certinfo(data, certnum, "ECC Public Key", q))
         return 1;
     }