From: Mark Andrews Date: Fri, 29 Oct 2021 05:57:50 +0000 (+1100) Subject: isc_result_t is now an enum which are signed, adjust format strings X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de223c9c6af6ca0fad1a3b5e5f941cd9dbef6bc2;p=thirdparty%2Fbind9.git isc_result_t is now an enum which are signed, adjust format strings --- diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index ba5ad175f0b..219041c7f2c 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -376,7 +376,7 @@ rndc_recvdone(isc_nmhandle_t *handle, isc_result_t result, void *arg) { result = isccc_cc_lookupuint32(data, "result", &eresult); if (result == ISC_R_SUCCESS) { - printf("%s %u\n", isc_result_toid(eresult), eresult); + printf("%s %d\n", isc_result_toid(eresult), eresult); } else { printf("NONE -1\n"); } diff --git a/bin/tests/system/resolve.c b/bin/tests/system/resolve.c index 2cc9668368e..6b53693024b 100644 --- a/bin/tests/system/resolve.c +++ b/bin/tests/system/resolve.c @@ -249,7 +249,7 @@ addserver(dns_client_t *client, const char *addrstr, const char *port, name = dns_fixedname_initname(&fname); result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL); if (result != ISC_R_SUCCESS) { - fprintf(stderr, "failed to convert qname: %u\n", + fprintf(stderr, "failed to convert qname: %d\n", result); exit(1); } @@ -258,7 +258,7 @@ addserver(dns_client_t *client, const char *addrstr, const char *port, result = dns_client_setservers(client, dns_rdataclass_in, name, &servers); if (result != ISC_R_SUCCESS) { - fprintf(stderr, "set server failed: %u\n", result); + fprintf(stderr, "set server failed: %d\n", result); exit(1); } } @@ -397,7 +397,7 @@ main(int argc, char *argv[]) { result = dst_lib_init(ctxs_mctx, NULL); if (result != ISC_R_SUCCESS) { - fprintf(stderr, "dst_lib_init failed: %u\n", result); + fprintf(stderr, "dst_lib_init failed: %d\n", result); exit(1); } @@ -406,7 +406,7 @@ main(int argc, char *argv[]) { ctxs_netmgr, ctxs_timermgr, clientopt, &client, addr4, addr6); if (result != ISC_R_SUCCESS) { - fprintf(stderr, "dns_client_create failed: %u, %s\n", result, + fprintf(stderr, "dns_client_create failed: %d, %s\n", result, isc_result_totext(result)); exit(1); } @@ -419,7 +419,7 @@ main(int argc, char *argv[]) { result = irs_resconf_load(ctxs_mctx, "/etc/resolv.conf", &resconf); if (result != ISC_R_SUCCESS && result != ISC_R_FILENOTFOUND) { - fprintf(stderr, "irs_resconf_load failed: %u\n", + fprintf(stderr, "irs_resconf_load failed: %d\n", result); exit(1); } @@ -428,7 +428,7 @@ main(int argc, char *argv[]) { nameservers); if (result != ISC_R_SUCCESS) { irs_resconf_destroy(&resconf); - fprintf(stderr, "dns_client_setservers failed: %u\n", + fprintf(stderr, "dns_client_setservers failed: %d\n", result); exit(1); } @@ -459,7 +459,7 @@ main(int argc, char *argv[]) { qname = dns_fixedname_initname(&qname0); result = dns_name_fromtext(qname, &b, dns_rootname, 0, NULL); if (result != ISC_R_SUCCESS) { - fprintf(stderr, "failed to convert qname: %u\n", result); + fprintf(stderr, "failed to convert qname: %d\n", result); } /* Perform resolution */ diff --git a/lib/isc/tests/timer_test.c b/lib/isc/tests/timer_test.c index d90ba2d1ae2..b977579d59a 100644 --- a/lib/isc/tests/timer_test.c +++ b/lib/isc/tests/timer_test.c @@ -181,7 +181,7 @@ static void subthread_assert_result_equal(isc_result_t result, isc_result_t expected, const char *file, unsigned int line) { if (result != expected) { - printf("# %s:%u subthread_assert_result_equal(%u != %u)\n", + printf("# %s:%u subthread_assert_result_equal(%d != %d)\n", file, line, result, expected); set_global_error(result); }