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

Brian Wellington via RT rt at openssl.org
Tue Mar 22 19:40:13 UTC 2016


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



More information about the openssl-dev mailing list