diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2017-02-26 07:54:47 +0100 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2017-02-26 07:54:47 +0100 |
commit | f5782e11a560fd590221042391254c810a42e45f (patch) | |
tree | fed06355a83e546ecfef7d8d293f048ae2999c14 /dirmngr | |
parent | trustdb: Respect --quiet during --import-ownertrust. (diff) | |
download | gnupg2-f5782e11a560fd590221042391254c810a42e45f.tar.xz gnupg2-f5782e11a560fd590221042391254c810a42e45f.zip |
dirmngr: Avoid warnings during non-ntbtls build.
* dirmngr/t-http.c (my_http_tls_verify_cb): Avoid warnings when not
using ntbtls.
--
Without this patch, when building without ntbtls, we see the following
warnings during "make check":
t-http.c: In function ‘my_http_tls_verify_cb’:
t-http.c:141:16: warning: implicit declaration of function
‘ntbtls_x509_get_peer_cert’ [-Wimplicit-function-declaration]
(cert = ntbtls_x509_get_peer_cert (tls_context, idx)); idx++)
^~~~~~~~~~~~~~~~~~~~~~~~~
t-http.c:141:14: warning: assignment makes pointer from integer
without a cast -Wint-conversion]
(cert = ntbtls_x509_get_peer_cert (tls_context, idx)); idx++)
^
At top level:
t-http.c:123:1: warning: ‘my_http_tls_verify_cb’ defined but not
used [-Wunused-function]
my_http_tls_verify_cb (void *opaque,
^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'dirmngr')
-rw-r--r-- | dirmngr/t-http.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dirmngr/t-http.c b/dirmngr/t-http.c index 68818de7a..35f59478b 100644 --- a/dirmngr/t-http.c +++ b/dirmngr/t-http.c @@ -118,7 +118,7 @@ my_gnutls_log (int level, const char *text) } #endif - +#if HTTP_USE_NTBTLS static gpg_error_t my_http_tls_verify_cb (void *opaque, http_t http, @@ -165,6 +165,7 @@ my_http_tls_verify_cb (void *opaque, log_info ("my_http_tls_verify_cb returns: %s\n", gpg_strerror (err)); return err; } +#endif /*HTTP_USE_NTBTLS*/ |