Current openssl of CSV Head has unavoidable warning inside of headers.

% cat t.c
#include <openssl/asn1.h>
int main(void) {
    i2d_ASN1_SET_OF_ASN1_TYPE(0,
            (unsigned char **) NULL, i2d_ASN1_TYPE,
            V_ASN1_SET, V_ASN1_UNIVERSAL, 0);
    return 0;
}

Warning by GCC 4.6
% /usr/local/bin/gcc46 -Wextra -I/home/naruse/local/openssl/include 
-L/home/naruse/local/openssl -lcrypto t.c && ./a.out
t.c: In function 'main':
t.c:5:1: warning: passing argument 1 of 'i2d_ASN1_SET' from incompatible 
pointer type [enabled by default]
/home/naruse/local/openssl/include/openssl/asn1.h:893:5: note: expected 'struct 
stack_st_OPENSSL_BLOCK *' but argument is of type 'struct _STACK *'

Warning by LLVM/Clang
% /home/naruse/local/llvm/bin/clang -Wextra 
-I/home/naruse/local/openssl/include -L/home/naruse/local/openssl -lcrypto t.c
t.c:3:5: warning: incompatible pointer types passing '_STACK *' (aka 'struct 
stack_st *') to
      parameter of type 'struct stack_st_OPENSSL_BLOCK *'
    i2d_ASN1_SET_OF_ASN1_TYPE(0,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from t.c:1:
In file included from /home/naruse/local/openssl/include/openssl/asn1.h:65:
In file included from /home/naruse/local/openssl/include/openssl/bio.h:69:
In file included from /home/naruse/local/openssl/include/openssl/crypto.h:129:
/home/naruse/local/openssl/include/openssl/safestack.h:2139:2: note: 
instantiated from:
        SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), 
(ex_class), (is_set))
        ^
/home/naruse/local/openssl/include/openssl/safestack.h:190:15: note: 
instantiated from:
        i2d_ASN1_SET(CHECKED_STACK_OF(type, st), pp, \
                     ^
/home/naruse/local/openssl/include/openssl/safestack.h:71:5: note: instantiated 
from:
    ((_STACK*) (1 ? p : (STACK_OF(type)*)0))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from t.c:1:
/home/naruse/local/openssl/include/openssl/asn1.h:893:43: note: passing 
argument to parameter 'a'
      here
int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp,
                                          ^
1 warning generated.
/usr/local/bin/ld: error in /usr/lib/crtend.o(.eh_frame); no .eh_frame_hdr 
table will be created.

-- 
NARUSE, Yui  <[email protected]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to