From: Alan T. DeKok Date: Tue, 13 Oct 2015 16:48:08 +0000 (-0400) Subject: Intermediate variable to avoid compiler warning X-Git-Tag: release_3_0_11~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1070f98a50ed92b00419b71dda8d97d25a7e790;p=thirdparty%2Ffreeradius-server.git Intermediate variable to avoid compiler warning --- diff --git a/src/main/tls.c b/src/main/tls.c index c1492910de7..bc9e233d6a7 100644 --- a/src/main/tls.c +++ b/src/main/tls.c @@ -1304,6 +1304,7 @@ static SSL_SESSION *cbtls_get_session(SSL *ssl, unsigned char *data, int len, in int rv, fd, todo; char filename[256]; unsigned char *p; + unsigned char const *q; struct stat st; VALUE_PAIR *vps = NULL; @@ -1354,8 +1355,8 @@ static SSL_SESSION *cbtls_get_session(SSL *ssl, unsigned char *data, int len, in close(fd); /* openssl mutates &p */ - p = sess_data; - sess = d2i_SSL_SESSION(NULL, (unsigned char const **)(void **) &p, st.st_size); + q = sess_data; + sess = d2i_SSL_SESSION(NULL, &q, st.st_size); if (!sess) { RWDEBUG("Failed loading persisted session: %s", ERR_error_string(ERR_get_error(), NULL));