diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-09-25 19:33:57 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-09-25 19:33:57 +0200 |
commit | 3688d1abaec557b496a9912d8ba5411f792761a3 (patch) | |
tree | d2c5c34d8b8c7f631648546388ff7b7bf8aec4a3 /src/danetool.c | |
parent | 57272b0f2e1863a0e4e946d543fae45c946d8b0a (diff) | |
download | gnutls-3688d1abaec557b496a9912d8ba5411f792761a3.tar.gz |
more compiler warning fixes
Diffstat (limited to 'src/danetool.c')
-rw-r--r-- | src/danetool.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/danetool.c b/src/danetool.c index 53123d8e5d..c43dd5e5f1 100644 --- a/src/danetool.c +++ b/src/danetool.c @@ -194,7 +194,8 @@ static void dane_check(const char *host, const char *proto, size_t size; unsigned del = 0; unsigned vflags = DANE_VFLAG_FAIL_IF_NOT_CHECKED; - const char *str; + const char *cstr; + char *str; gnutls_x509_crt_t *clist = NULL; unsigned int clist_size = 0; gnutls_datum_t certs[MAX_CLIST_SIZE]; @@ -249,7 +250,6 @@ static void dane_check(const char *host, const char *proto, } if (ENABLED_OPT(PRINT_RAW)) { - unsigned entries; gnutls_datum_t t; char **dane_data; int *dane_data_len; @@ -266,7 +266,6 @@ static void dane_check(const char *host, const char *proto, } for (i=0;i<entries;i++) { - char *str; size_t str_size; t.data = (void*)dane_data[i]; t.size = dane_data_len[i]; @@ -357,17 +356,17 @@ static void dane_check(const char *host, const char *proto, port, proto, host, usage, type, match, lbuffer); if (!HAVE_OPT(QUIET)) { - str = dane_cert_usage_name(usage); - if (str == NULL) str= "Unknown"; - fprintf(outfile, "Certificate usage: %s (%.2x)\n", str, usage); + cstr = dane_cert_usage_name(usage); + if (cstr == NULL) cstr= "Unknown"; + fprintf(outfile, "Certificate usage: %s (%.2x)\n", cstr, usage); - str = dane_cert_type_name(type); - if (str == NULL) str= "Unknown"; - fprintf(outfile, "Certificate type: %s (%.2x)\n", str, type); + cstr = dane_cert_type_name(type); + if (cstr == NULL) cstr= "Unknown"; + fprintf(outfile, "Certificate type: %s (%.2x)\n", cstr, type); - str = dane_match_type_name(match); - if (str == NULL) str= "Unknown"; - fprintf(outfile, "Contents: %s (%.2x)\n", str, match); + cstr = dane_match_type_name(match); + if (cstr == NULL) cstr= "Unknown"; + fprintf(outfile, "Contents: %s (%.2x)\n", cstr, match); fprintf(outfile, "Data: %s\n", lbuffer); } |