[Pkg-gnupg-commit] [gnupg2] 141/166: dirmngr: Avoid warnings during non-ntbtls build.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Mar 16 22:33:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit f5782e11a560fd590221042391254c810a42e45f
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Sat Feb 25 22:54:47 2017 -0800

    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 at fifthhorseman.net>
---
 dirmngr/t-http.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dirmngr/t-http.c b/dirmngr/t-http.c
index 68818de..35f5947 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*/
 
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list