Appease GCC's uninitialized value warning. GCC notices that one function believes < 0 is the error while the other believes it's != 0. unw_get_reg never returns positive, but match them. Change-Id: I40af614e6b1400bf3d398bd32beb6d3ec702bc11 Reviewed-on: https://boringssl-review.googlesource.com/c/34985 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com>
diff --git a/crypto/test/abi_test.cc b/crypto/test/abi_test.cc index ed6a2f8..9844c73 100644 --- a/crypto/test/abi_test.cc +++ b/crypto/test/abi_test.cc
@@ -446,7 +446,7 @@ int GetReg(crypto_word_t *out, unw_regnum_t reg) { unw_word_t val; int ret = unw_get_reg(&cursor_, reg, &val); - if (ret == 0) { + if (ret >= 0) { static_assert(sizeof(crypto_word_t) == sizeof(unw_word_t), "crypto_word_t and unw_word_t are inconsistent"); *out = val;