Fixes to address build warnings for GCC 7. Used -Wimplicit-fallthrough=0
to suppress all switch fall-through warnings.
This commit is contained in:
parent
ce42738198
commit
c0c98c8f64
@ -113,6 +113,7 @@ OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET"
|
||||
DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_WOLFSSL"
|
||||
LIB_ADD=
|
||||
LIB_STATIC_ADD=
|
||||
SWITCH_FALLTHROUGH="-Wimplicit-fallthrough=0"
|
||||
|
||||
thread_ls_on=no
|
||||
# Thread local storage
|
||||
@ -3422,6 +3423,10 @@ case $host_os in
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
# add workaround for switch fall-through
|
||||
CFLAGS="$CFLAGS $SWITCH_FALLTHROUGH"
|
||||
|
||||
|
||||
# add user C_EXTRA_FLAGS back
|
||||
# For distro disable custom build options that interfere with symbol generation
|
||||
if test "$ENABLED_DISTRO" = "no"
|
||||
@ -3430,6 +3435,8 @@ then
|
||||
fi
|
||||
OPTION_FLAGS="$USER_CFLAGS $USER_C_EXTRA_FLAGS $AM_CFLAGS"
|
||||
|
||||
|
||||
|
||||
CREATE_HEX_VERSION
|
||||
AC_SUBST([AM_CPPFLAGS])
|
||||
AC_SUBST([AM_CFLAGS])
|
||||
|
@ -8509,12 +8509,14 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
|
||||
|
||||
case KEY_EXCHANGE_SENT :
|
||||
#ifndef NO_CERTS
|
||||
if (!ssl->options.resuming)
|
||||
if (ssl->options.verifyPeer)
|
||||
if (!ssl->options.resuming) {
|
||||
if (ssl->options.verifyPeer) {
|
||||
if ( (ssl->error = SendCertificateRequest(ssl)) != 0) {
|
||||
WOLFSSL_ERROR(ssl->error);
|
||||
return SSL_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ssl->options.acceptState = CERT_REQ_SENT;
|
||||
WOLFSSL_MSG("accept state CERT_REQ_SENT");
|
||||
|
@ -5404,13 +5404,15 @@ int wolfSSL_accept_TLSv13(WOLFSSL* ssl)
|
||||
WOLFSSL_MSG("accept state SERVER_EXTENSIONS_SENT");
|
||||
case SERVER_EXTENSIONS_SENT :
|
||||
#ifndef NO_CERTS
|
||||
if (!ssl->options.resuming)
|
||||
if (ssl->options.verifyPeer)
|
||||
if (!ssl->options.resuming) {
|
||||
if (ssl->options.verifyPeer) {
|
||||
ssl->error = SendTls13CertificateRequest(ssl);
|
||||
if (ssl->error != 0) {
|
||||
WOLFSSL_ERROR(ssl->error);
|
||||
return SSL_FATAL_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ssl->options.acceptState = CERT_REQ_SENT;
|
||||
WOLFSSL_MSG("accept state CERT_REQ_SENT");
|
||||
|
@ -3642,9 +3642,9 @@ int aes_test(void)
|
||||
byte iv[] = "1234567890abcdef "; /* align */
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
if (wc_AesAsyncInit(&enc, devId) != 0)
|
||||
if (wc_AesInit(&enc, HEAP_HINT, devId) != 0)
|
||||
return -4200;
|
||||
if (wc_AesAsyncInit(&dec, devId) != 0)
|
||||
if (wc_AesInit(&dec, HEAP_HINT, devId) != 0)
|
||||
return -4201;
|
||||
#endif
|
||||
|
||||
|
@ -597,7 +597,7 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
|
||||
|
||||
#ifndef TEST_IPV6
|
||||
/* peer could be in human readable form */
|
||||
if ( (peer != INADDR_ANY) && isalpha((int)peer[0])) {
|
||||
if ( ((size_t)peer != INADDR_ANY) && isalpha((int)peer[0])) {
|
||||
#if defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET)
|
||||
int err;
|
||||
struct hostent* entry = gethostbyname(peer, &err);
|
||||
@ -627,7 +627,7 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
|
||||
addr->sin_family = AF_INET_V;
|
||||
#endif
|
||||
addr->sin_port = XHTONS(port);
|
||||
if (peer == INADDR_ANY)
|
||||
if ((size_t)peer == INADDR_ANY)
|
||||
addr->sin_addr.s_addr = INADDR_ANY;
|
||||
else {
|
||||
if (!useLookup)
|
||||
|
Loading…
x
Reference in New Issue
Block a user