Fix MacOS/X build warnings
authorViktor Dukhovni <openssl-users@dukhovni.org>
Thu, 11 Feb 2016 18:44:53 +0000 (13:44 -0500)
committerViktor Dukhovni <openssl-users@dukhovni.org>
Thu, 11 Feb 2016 18:53:39 +0000 (13:53 -0500)
Commit 7823d792d0cad3b44ad5389a8d3381becefe7f44 added DEFINE_LHASH_OF
to a C source file.  DEFINE_LHASH_OF() and DEFINE_STACK_OF() must
be used only in header files to avoid clang warnings for unused
static-inline functions.

Reviewed-by: Rich Salz <rsalz@openssl.org>
ssl/ssl_cert.c
ssl/ssl_locl.h

index cc82fff423d090379c778e9b3af9b62e85297edc..faa7a95dddfdb31dbf2cb18ed6c8cf8bb58a6392 100644 (file)
@@ -647,8 +647,6 @@ static unsigned long xname_hash(const X509_NAME *a)
     return X509_NAME_hash((X509_NAME *)a);
 }
 
     return X509_NAME_hash((X509_NAME *)a);
 }
 
-DEFINE_LHASH_OF(X509_NAME);
-
 /**
  * Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed;
  * it doesn't really have anything to do with clients (except that a common use
 /**
  * Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed;
  * it doesn't really have anything to do with clients (except that a common use
index d7a7d0176356b3642c800ab9731e163274b769f5..7fdb2638e7b4e7b217947d4a7ef3c1f00bfd899b 100644 (file)
@@ -685,7 +685,8 @@ struct ssl_comp_st {
 };
 
 DEFINE_LHASH_OF(SSL_SESSION);
 };
 
 DEFINE_LHASH_OF(SSL_SESSION);
-
+/* Needed in ssl_cert.c */
+DEFINE_LHASH_OF(X509_NAME);
 
 struct ssl_ctx_st {
     const SSL_METHOD *method;
 
 struct ssl_ctx_st {
     const SSL_METHOD *method;