[exim-dev] Clang warnings for RC2 #7

Pàgina inicial
Delete this message
Reply to this message
Autor: Richard Clayton
Data:  
A: exim-dev
Assumpte: [exim-dev] Clang warnings for RC2 #7
for tls.c there's two warnings:

In file included from tls.c:120:
./tls-openssl.c:426:39: warning: passing 'uschar *' (aka 'unsigned char
*') to parameter of type 'const char *' converts between pointers to
integer types
      with different sign [-Wpointer-sign]
      if ((rc = X509_check_host(cert, name, 0,



ie: the actual problem is in tls-openssl.c (which is included by tls.c)
where string_nextinlist provides a list of uschar * objects but the
OpenSSL routine wants const char *.

I could not say whether this just requires a cast or whether there's a
deeper issue here (which would be that the "wrong sort of characters"
can be handed over to OpenSSL... viz: that the type is wrong in the
tls_ext_ctx_cb structure).

The second warning is just one of the && || issues at line 277 of tls.c
itself:

      || Ustrncmp(ele, match, len) == 0 && ele[len] == '='
is better as
      || (Ustrncmp(ele, match, len) == 0 && ele[len] == '=')


-- 
richard                                                   Richard Clayton


Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety. Benjamin Franklin 11 Nov 1755