From 08c0c4d6e4b9aeb7f469f21918a3f75123262a05 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 30 Dec 2015 14:39:11 +0100 Subject: [PATCH] Fixes from testing on different platforms --- src/context.c | 3 +-- src/dnssec.c | 7 ------- src/test/getdns_query.c | 6 +++--- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/context.c b/src/context.c index 3228aedc..95ff1b63 100644 --- a/src/context.c +++ b/src/context.c @@ -729,8 +729,7 @@ static getdns_return_t set_os_defaults_windows(struct getdns_context *context) { char domain[1024] = ""; - size_t upstreams_limit = 10, length; - struct getdns_bindata bindata; + size_t upstreams_limit = 10; struct addrinfo hints; struct addrinfo *result; getdns_upstream *upstream; diff --git a/src/dnssec.c b/src/dnssec.c index a1b5e8d8..94cf8cfd 100644 --- a/src/dnssec.c +++ b/src/dnssec.c @@ -428,13 +428,6 @@ inline static void debug_sec_print_dname(const char *msg, const uint8_t *label) else DEBUG_SEC("%s\n", msg); } -inline static void debug_sec_print_pkt( - const char *msg, uint8_t *pkt, size_t pkt_len) -{ - char *str; - DEBUG_SEC("%s%s\n", msg, (str = gldns_wire2str_pkt(pkt, pkt_len))); - if (str) free(str); -} #else #define debug_sec_print_rr(...) DEBUG_OFF(__VA_ARGS__) #define debug_sec_print_dname(...) DEBUG_OFF(__VA_ARGS__) diff --git a/src/test/getdns_query.c b/src/test/getdns_query.c index 2e0acb5b..a2fdc71c 100644 --- a/src/test/getdns_query.c +++ b/src/test/getdns_query.c @@ -750,7 +750,7 @@ getdns_return_t parse_args(int argc, char **argv) "specify_class", GETDNS_RRCLASS_ANY); else if (strncasecmp(arg+15, "CLASS", 5) == 0) { klass = strtol(arg + 20, &endptr, 10); - if (*endptr || klass < 0 || klass > 255) + if (*endptr || klass > 255) fprintf(stderr, "Unknown class: %s\n", arg+15); @@ -1114,11 +1114,11 @@ next: ; /* apply the accumulated pubkey pinset to all upstreams: */ for (i = 0; i < upstream_count; i++) { if (r = getdns_list_get_dict(upstream_list, i, &upstream), r) { - fprintf(stderr, "Failed to get upstream %lu when adding pinset\n", i); + fprintf(stderr, "Failed to get upstream %lu when adding pinset\n", (long unsigned int)i); return r; } if (r = getdns_dict_set_list(upstream, "tls_pubkey_pinset", pubkey_pinset), r) { - fprintf(stderr, "Failed to set pubkey pinset on upstream %lu\n", i); + fprintf(stderr, "Failed to set pubkey pinset on upstream %lu\n", (long unsigned int)i); return r; } }