Fix build on android_aarch64. Whether UCHAR_MAX expands to a signed or unsigned number appears to be a matter of some debate. Or the Android headers are wrong. Just add a cast and not think about it too hard. Change-Id: I84e928bdfe459a9129cde276c82b60a318533552 Reviewed-on: https://boringssl-review.googlesource.com/15385 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/compiler_test.cc b/crypto/compiler_test.cc index 5b1c014..2836276 100644 --- a/crypto/compiler_test.cc +++ b/crypto/compiler_test.cc
@@ -58,7 +58,7 @@ TEST(CompilerTest, IntegerRepresentation) { EXPECT_EQ(8, CHAR_BIT); - EXPECT_EQ(0xff, UCHAR_MAX); + EXPECT_EQ(0xff, static_cast<int>(UCHAR_MAX)); // uint8_t is assumed to be unsigned char. I.e., casting to uint8_t should be // as good as unsigned char for strict aliasing purposes.