forked from wolfSSL/wolfssl
add -Wunreachable-code
This commit is contained in:
@@ -1516,8 +1516,9 @@ static int GetKey(DecodedCert* cert)
|
||||
XMEMCPY(cert->publicKey, keyBlob, keyLen);
|
||||
cert->pubKeyStored = 1;
|
||||
cert->pubKeySize = keyLen;
|
||||
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
#endif /* HAVE_NTRU */
|
||||
#ifdef HAVE_ECC
|
||||
case ECDSAk:
|
||||
@@ -1560,14 +1561,13 @@ static int GetKey(DecodedCert* cert)
|
||||
cert->pubKeySize = length;
|
||||
|
||||
cert->srcIdx += length;
|
||||
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
#endif /* HAVE_ECC */
|
||||
default:
|
||||
return ASN_UNKNOWN_OID_E;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -86,7 +86,6 @@ static int InitHmac(Hmac* hmac, int type)
|
||||
|
||||
default:
|
||||
return BAD_FUNC_ARG;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -2412,10 +2412,6 @@ int camellia_test(void)
|
||||
{CAM_CBC_DEC, ptc, ivc, c6, k6, sizeof(k6), -125}
|
||||
};
|
||||
|
||||
if ((sizeof(pte) != CAMELLIA_BLOCK_SIZE) ||
|
||||
(sizeof(ptc) != CAMELLIA_BLOCK_SIZE))
|
||||
return -113;
|
||||
|
||||
testsSz = sizeof(testVectors)/sizeof(test_vector_t);
|
||||
for (i = 0; i < testsSz; i++) {
|
||||
CamelliaSetKey(&cam, testVectors[i].key, testVectors[i].keySz,
|
||||
|
@@ -121,6 +121,7 @@
|
||||
AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cflags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cflags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cflags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunreachable-code],,[$ax_append_compile_cflags_extra])
|
||||
dnl Anything below this comment please keep sorted.
|
||||
AS_IF([test "$CC" = "clang"],[],[
|
||||
AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cflags_extra])
|
||||
@@ -190,6 +191,7 @@
|
||||
AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cxxflags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cxxflags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cxxflags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wunreachable-code],,[$ax_append_compile_cxxflags_extra])
|
||||
dnl Anything below this comment please keep sorted.
|
||||
AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cxxflags_extra])
|
||||
AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cxxflags_extra])
|
||||
|
@@ -4154,8 +4154,9 @@ static INLINE int Encrypt(CYASSL* ssl, byte* out, const byte* input, word16 sz)
|
||||
additional, AEAD_AUTH_DATA_SZ);
|
||||
AeadIncrementExpIV(ssl);
|
||||
XMEMSET(nonce, 0, AEAD_NONCE_SZ);
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CAMELLIA
|
||||
@@ -4172,7 +4173,6 @@ static INLINE int Encrypt(CYASSL* ssl, byte* out, const byte* input, word16 sz)
|
||||
#ifdef BUILD_RABBIT
|
||||
case cyassl_rabbit:
|
||||
return RabbitProcess(ssl->encrypt.rabbit, out, input, sz);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NULL_CIPHER
|
||||
@@ -4309,7 +4309,6 @@ static INLINE int Decrypt(CYASSL* ssl, byte* plain, const byte* input,
|
||||
#ifdef BUILD_RABBIT
|
||||
case cyassl_rabbit:
|
||||
return RabbitProcess(ssl->decrypt.rabbit, plain, input, sz);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NULL_CIPHER
|
||||
@@ -4861,7 +4860,7 @@ int ProcessReply(CYASSL* ssl)
|
||||
#endif
|
||||
|
||||
for (;;) {
|
||||
switch ((processReply)ssl->options.processReply) {
|
||||
switch (ssl->options.processReply) {
|
||||
|
||||
/* in the CYASSL_SERVER case, get the first byte for detecting
|
||||
* old client hello */
|
||||
@@ -5184,6 +5183,7 @@ int ProcessReply(CYASSL* ssl)
|
||||
ssl->options.processReply = doProcessInit;
|
||||
continue;
|
||||
}
|
||||
|
||||
default:
|
||||
CYASSL_MSG("Bad process input state, programming error");
|
||||
return INPUT_CASE_ERROR;
|
||||
|
Reference in New Issue
Block a user