Re: [openssl-dev] [openssl.org #4471] 1.1.0-pre4 safestack.h compilation errors with -Wcast-qual

2016-05-16 Thread Brian Wellington via RT
This is fixed, but there are similar problems that still exist, for example:

—
#include 
#include 

int
main(int argc, char **argv) {
return 0;
}
—

clang -Wcast-qual -o foo.o foo.c -I openssl-SNAP-20160516/include/
In file included from foo.c:1:
In file included from openssl-SNAP-20160516/include/openssl/err.h:123:
openssl-SNAP-20160516/include/openssl/lhash.h:265:1: warning: cast from 'const
  struct lhash_st_OPENSSL_STRING *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
DEFINE_LHASH_OF(OPENSSL_STRING);
^
openssl-SNAP-20160516/include/openssl/lhash.h:217:37: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_node_stats_bio((_LHASH *)lh, out); \
^
openssl-SNAP-20160516/include/openssl/lhash.h:265:1: warning: cast from 'const
  struct lhash_st_OPENSSL_STRING *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
openssl-SNAP-20160516/include/openssl/lhash.h:221:43: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_node_usage_stats_bio((_LHASH *)lh, out); \
  ^
openssl-SNAP-20160516/include/openssl/lhash.h:265:1: warning: cast from 'const
  struct lhash_st_OPENSSL_STRING *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
openssl-SNAP-20160516/include/openssl/lhash.h:225:32: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_stats_bio((_LHASH *)lh, out); \
   ^
openssl-SNAP-20160516/include/openssl/lhash.h:266:1: warning: cast from 'const
  struct lhash_st_OPENSSL_CSTRING *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
DEFINE_LHASH_OF(OPENSSL_CSTRING);
^
openssl-SNAP-20160516/include/openssl/lhash.h:217:37: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_node_stats_bio((_LHASH *)lh, out); \
^
openssl-SNAP-20160516/include/openssl/lhash.h:266:1: warning: cast from 'const
  struct lhash_st_OPENSSL_CSTRING *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
openssl-SNAP-20160516/include/openssl/lhash.h:221:43: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_node_usage_stats_bio((_LHASH *)lh, out); \
  ^
openssl-SNAP-20160516/include/openssl/lhash.h:266:1: warning: cast from 'const
  struct lhash_st_OPENSSL_CSTRING *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
openssl-SNAP-20160516/include/openssl/lhash.h:225:32: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_stats_bio((_LHASH *)lh, out); \
   ^
In file included from foo.c:1:
openssl-SNAP-20160516/include/openssl/err.h:321:1: warning: cast from 'const
  struct lhash_st_ERR_STRING_DATA *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
DEFINE_LHASH_OF(ERR_STRING_DATA);
^
openssl-SNAP-20160516/include/openssl/lhash.h:217:37: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_node_stats_bio((_LHASH *)lh, out); \
^
In file included from foo.c:1:
openssl-SNAP-20160516/include/openssl/err.h:321:1: warning: cast from 'const
  struct lhash_st_ERR_STRING_DATA *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
openssl-SNAP-20160516/include/openssl/lhash.h:221:43: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_node_usage_stats_bio((_LHASH *)lh, out); \
  ^
In file included from foo.c:1:
openssl-SNAP-20160516/include/openssl/err.h:321:1: warning: cast from 'const
  struct lhash_st_ERR_STRING_DATA *' to 'struct lhash_st *' drops const
  qualifier [-Wcast-qual]
openssl-SNAP-20160516/include/openssl/lhash.h:225:32: note: expanded from macro
  'DEFINE_LHASH_OF'
lh_stats_bio((_LHASH *)lh, out); \
   ^
In file included from foo.c:2:
openssl-SNAP-20160516/include/openssl/ssl.h:918:1: warning: cast from 'const
  struct ssl_cipher_st *' to 'void *' drops const qualifier [-Wcast-qual]
DEFINE_STACK_OF_CONST(SSL_CIPHER)
^
openssl-SNAP-20160516/include/openssl/safestack.h:188:35: note: expanded from
  macro 'DEFINE_STACK_OF_CONST'
# define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t)
  ^
openssl-SNAP-20160516/include/openssl/safestack.h:123:58: note: expanded from
  macro 'SKM_DEFINE_STACK_OF'
return (t2 *)sk_delete_ptr((_STACK *)sk, (void *)ptr); \
 ^
In file included from foo.c:2:
openssl-SNAP-20160516/include/openssl/ssl.h:918:1: warning: cast from 'const
  struct ssl_cipher_st *' to 'void *' drops const qualifier [-Wcast-qual]
openssl-SNAP-20160516/include/openssl/safestack.h:188:35: note: expanded from
  macro 'DEFINE_STACK_OF_CONST'
# define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t)
  ^

[openssl-dev] [openssl.org #4471] 1.1.0-pre4 safestack.h compilation errors with -Wcast-qual

2016-03-22 Thread Brian Wellington via RT
Attempting to compile this program:

#include 

int
main(int argc, char **argv) {
return 0;
}

with -Wcast-qual (with both gcc and clang) results in errors like this 
(repeated a number of times).

target/include/openssl/safestack.h:214:1: warning: cast from 'const struct
  stack_st_OPENSSL_STRING *' to 'struct stack_st *' drops const qualifier
  [-Wcast-qual]
DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char)
^
target/include/openssl/safestack.h:186:42: note: expanded from macro
  'DEFINE_SPECIAL_STACK_OF'
# define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2)
 ^
target/include/openssl/safestack.h:95:33: note: expanded from macro
  'SKM_DEFINE_STACK_OF'
return sk_num((_STACK *)sk); \
^

This doesn’t happen with 1.0.2g.

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4471
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl.org #2797] 1.0.1a build failure on OS X

2012-04-20 Thread Brian Wellington via RT
I just tried building 1.0.1a on OS X (Lion, if it matters), and it failed with:

Undefined symbols for architecture x86_64:
 _rc4_md5_enc, referenced from:
 _rc4_hmac_md5_cipher in libcrypto.a(e_rc4_hmac_md5.o)
ld: symbol(s) not found for architecture x86_64


Looking through the CVS logs, I found:

2011-Nov-15 13:39  1.1.2.4  Check-in [21726] on branch 
OpenSSL_1_0_1-stable: e_rc4_hmac_md5.c: make it work on darwin64, which is 
configured with RC4_CHAR. By appro. (diff)

and applying that patch appears to fix the problem, but it looks like it was 
reverted (possibly unintentionally?) in 1.1.2.4.2.1 and 1.1.2.5.

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org