From: Dr. Stephen Henson Date: Tue, 27 May 2008 11:28:49 +0000 (+0000) Subject: Avoid warning about empty structures and always define CHECKED_PTR_OF X-Git-Tag: OpenSSL_0_9_8k^2~385 X-Git-Url: https://git.openssl.org/gitweb/?a=commitdiff_plain;h=0a56761f1942ca27e7a573a1a083e20910eba996;p=openssl.git Avoid warning about empty structures and always define CHECKED_PTR_OF --- diff --git a/crypto/lhash/lhash.h b/crypto/lhash/lhash.h index ac1c400ee0..558c11c6e4 100644 --- a/crypto/lhash/lhash.h +++ b/crypto/lhash/lhash.h @@ -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)) diff --git a/crypto/stack/safestack.h b/crypto/stack/safestack.h index d57519fd52..50de737c41 100644 --- a/crypto/stack/safestack.h +++ b/crypto/stack/safestack.h @@ -57,13 +57,13 @@ #include -#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)))