sp pragram around sanity check for vcpkg build warning
This commit is contained in:
parent
114471d6cf
commit
d5a7b56332
@ -4822,6 +4822,10 @@ int sp_copy(const sp_int* a, sp_int* r)
|
||||
}
|
||||
/* Only copy if different pointers. */
|
||||
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. */
|
||||
if (a->used > r->size) {
|
||||
err = MP_VAL;
|
||||
@ -4841,6 +4845,7 @@ int sp_copy(const sp_int* a, sp_int* r)
|
||||
r->sign = a->sign;
|
||||
#endif
|
||||
}
|
||||
PRAGMA_GCC_DIAG_POP
|
||||
}
|
||||
|
||||
return err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user