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

Blumenthal, Uri - 0553 - MITLL uri at ll.mit.edu
Tue Mar 22 20:03:07 UTC 2016


I don’t seem to be able to replicate with either 1.0.2h-dev, or
1.1.0-pre<whatever> using clang-3.7 and gcc-5.3 (on Mac OS X 10.10.5).
Here’s 1.1.0-pre output:

$ cat t9.c
#include <openssl/crypto.h>

int
main(int argc, char **argv) {
    return 0;
}
$ gcc -Wcast-qual -I/Users/ur20980/include -o t9 t9.c -L/Users/ur20980/lib
-lcrypto
$ clang -Wcast-qual -I/Users/ur20980/include -o t9 t9.c
-L/Users/ur20980/lib -lcrypto
$ clang-mp-3.7 -Wcast-qual -I/Users/ur20980/include -o t9 t9.c
-L/Users/ur20980/lib -lcrypto
$


-- 
Regards,
Uri Blumenthal





On 3/22/16, 15:40 , "openssl-dev on behalf of Brian Wellington via RT"
<openssl-dev-bounces at openssl.org on behalf of rt at openssl.org> wrote:

>Attempting to compile this program:
>
>#include <openssl/crypto.h>
>
>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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4324 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20160322/d907fe84/attachment.bin>


More information about the openssl-dev mailing list