]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix cppcheck warnings: adjust format strings to match arguments.
authorMark Andrews <marka@isc.org>
Tue, 1 Oct 2019 07:11:27 +0000 (17:11 +1000)
committerMark Andrews <marka@isc.org>
Tue, 1 Oct 2019 23:25:00 +0000 (09:25 +1000)
bin/tests/system/lwresd/lwtest.c
lib/dns/dst_api.c

index b690c75773b9938368db5c6e661c9c0d07585261..5bea6375c0d02ec319cc8f7e8feda184eb7205b0 100644 (file)
@@ -9,8 +9,6 @@
  * information regarding copyright ownership.
  */
 
-/* $Id: lwtest.c,v 1.32 2008/04/02 02:37:42 marka Exp $ */
-
 #include <config.h>
 
 #include <assert.h>
@@ -42,7 +40,7 @@ static int fails = 0;
 static void
 CHECK(lwres_result_t val, const char *msg) {
        if (val != 0) {
-               printf("I:%s returned %d\n", msg, val);
+               printf("I:%s returned %u\n", msg, val);
                exit(1);
        }
 }
@@ -139,7 +137,7 @@ test_gabn(const char *target, lwres_result_t expected, const char *address,
                                   LWRES_ADDRTYPE_V4 | LWRES_ADDRTYPE_V6,
                                   &res);
        if (ret != expected) {
-               printf("I:gabn(%s) failed: %d\n", target, ret);
+               printf("I:gabn(%s) failed: %u\n", target, ret);
                if (res != NULL)
                        lwres_gabnresponse_free(ctx, &res);
                fails++;
@@ -207,7 +205,7 @@ test_gnba(const char *target, uint32_t af, lwres_result_t expected,
        res = NULL;
        ret = lwres_getnamebyaddr(ctx, af, len, addrbuf, &res);
        if (ret != expected) {
-               printf("I:gnba(%s) failed: %d\n", target, ret);
+               printf("I:gnba(%s) failed: %u\n", target, ret);
                if (res != NULL)
                        lwres_gnbaresponse_free(ctx, &res);
                fails++;
@@ -622,12 +620,12 @@ test_getrrsetbyname(const char *name, int rdclass, int rdtype,
        } else if (ret != 0)
                return;
        if (rrinfo->rri_nrdatas != nrdatas) {
-               printf("I:getrrsetbyname(%s, %d): got %d rr, expected %d\n",
+               printf("I:getrrsetbyname(%s, %d): got %u rr, expected %u\n",
                        name, rdtype, rrinfo->rri_nrdatas, nrdatas);
                fails++;
        }
        if (rrinfo->rri_nsigs != nsigs) {
-               printf("I:getrrsetbyname(%s, %d): got %d sig, expected %d\n",
+               printf("I:getrrsetbyname(%s, %d): got %u sig, expected %u\n",
                        name, rdtype, rrinfo->rri_nsigs, nsigs);
                fails++;
        }
index 1213c49e95e6058251e39f82c7ed5326f8baaf19..54c4955498d99c9aae7a220c33747c5e584c98b5 100644 (file)
@@ -1864,7 +1864,7 @@ buildfilename(dns_name_t *name, dns_keytag_t id,
                return (ISC_R_NOSPACE);
        snprintf((char *) isc_buffer_used(out),
                 (int)isc_buffer_availablelength(out),
-                "+%03d+%05d%s", alg, id, suffix);
+                "+%03u+%05d%s", alg, id, suffix);
        isc_buffer_add(out, len);
 
        return (ISC_R_SUCCESS);