Avoid warning about empty structures and always define CHECKED_PTR_OF
authorDr. Stephen Henson <steve@openssl.org>
Tue, 27 May 2008 11:28:49 +0000 (11:28 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 27 May 2008 11:28:49 +0000 (11:28 +0000)
crypto/lhash/lhash.h
crypto/stack/safestack.h

index ac1c400ee04bae1f2aa99e7dc2b0a5d226146f22..558c11c6e4cdd24ef9700cb41f225bf22362d432 100644 (file)
@@ -198,7 +198,7 @@ void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
 
 #define LHASH_OF(type) struct lhash_st_##type
 
-#define DECLARE_LHASH_OF(type) LHASH_OF(type) { }
+#define DECLARE_LHASH_OF(type) LHASH_OF(type) { int dummy; }
 
 #define CHECKED_LHASH_OF(type,lh) \
   ((_LHASH *)CHECKED_PTR_OF(LHASH_OF(type),lh))
index d57519fd527f4b2781cd475c4fbff02340941970..50de737c419e075bfc2ea1142a47476dc9571088 100644 (file)
 
 #include <openssl/stack.h>
 
-#ifdef DEBUG_SAFESTACK
-
 #ifndef CHECKED_PTR_OF
 #define CHECKED_PTR_OF(type, p) \
     ((void*) (1 ? p : (type*)0))
 #endif
 
+#ifdef DEBUG_SAFESTACK
+
 #define CHECKED_SK_FREE_FUNC(type, p) \
     ((void (*)(void *)) ((1 ? p : (void (*)(type *))0)))