Prevent compiler warning for unused static function.
authorDavide Galassi <davxy@datawok.net>
Sat, 25 Jan 2020 11:56:44 +0000 (12:56 +0100)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Thu, 6 Feb 2020 15:40:16 +0000 (16:40 +0100)
Prepend missing ossl_unused in front of lh_type_new to make the compiler
happy.

CLA: trivial

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10946)

include/openssl/lhash.h

index b1b5aa550afcee0084e28f46c6b15e8395f67f59..2be4cf4236d15f4084fc3e6eeba1cfded9586a67 100644 (file)
@@ -127,9 +127,8 @@ void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
 
 # define DEFINE_LHASH_OF(type) \
     LHASH_OF(type) { union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; }; \
-    static ossl_inline LHASH_OF(type) * \
-        lh_##type##_new(unsigned long (*hfn)(const type *), \
-                        int (*cfn)(const type *, const type *)) \
+    static ossl_unused ossl_inline LHASH_OF(type) *lh_##type##_new(unsigned long (*hfn)(const type *), \
+                                                                   int (*cfn)(const type *, const type *)) \
     { \
         return (LHASH_OF(type) *) \
             OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn); \