forked from wolfSSL/wolfssl
Merge pull request #5949 from JacobBarthelmeh/Testing
add pragram around sanity check for vcpkg build warning
This commit is contained in:
@@ -12909,9 +12909,17 @@ static int ProcessPeerCertParse(WOLFSSL* ssl, ProcPeerCertArgs* args,
|
|||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_GCC_DIAG_PUSH
|
||||||
|
PRAGMA_GCC("GCC diagnostic ignored \"-Wstrict-overflow\"")
|
||||||
|
/* Surrounded in gcc pragma to avoid -Werror=strict-overflow when the
|
||||||
|
* compiler optimizes out the check and assumes no underflow. Keeping the
|
||||||
|
* check in place to handle multiple build configurations and future
|
||||||
|
* changes. */
|
||||||
|
|
||||||
/* check to make sure certificate index is valid */
|
/* check to make sure certificate index is valid */
|
||||||
if (args->certIdx > args->count)
|
if (args->certIdx > args->count)
|
||||||
return BUFFER_E;
|
return BUFFER_E;
|
||||||
|
PRAGMA_GCC_DIAG_POP
|
||||||
|
|
||||||
/* check if returning from non-blocking OCSP */
|
/* check if returning from non-blocking OCSP */
|
||||||
/* skip this section because cert is already initialized and parsed */
|
/* skip this section because cert is already initialized and parsed */
|
||||||
|
@@ -4874,6 +4874,10 @@ int sp_copy(const sp_int* a, sp_int* r)
|
|||||||
}
|
}
|
||||||
/* Only copy if different pointers. */
|
/* Only copy if different pointers. */
|
||||||
else if (a != r) {
|
else if (a != r) {
|
||||||
|
PRAGMA_GCC_DIAG_PUSH
|
||||||
|
PRAGMA_GCC("GCC diagnostic ignored \"-Wstrict-overflow\"")
|
||||||
|
/* Surrounded in gcc pragma to avoid -Werror=strict-overflow when the
|
||||||
|
* compiler optimizes out the check and assumes no overflow. */
|
||||||
/* Validated space in result. */
|
/* Validated space in result. */
|
||||||
if (a->used > r->size) {
|
if (a->used > r->size) {
|
||||||
err = MP_VAL;
|
err = MP_VAL;
|
||||||
@@ -4893,6 +4897,7 @@ int sp_copy(const sp_int* a, sp_int* r)
|
|||||||
r->sign = a->sign;
|
r->sign = a->sign;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
PRAGMA_GCC_DIAG_POP
|
||||||
}
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
|
Reference in New Issue
Block a user