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>
This commit is contained in:
David Benjamin 2017-04-21 18:38:56 -04:00 committed by Adam Langley
parent 02ba1789a3
commit 8da870a9e0

View File

@ -58,7 +58,7 @@ static void CheckRepresentation(T value) {
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.