Browse Source

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>
kris/onging/CECPQ3_patch15
David Benjamin 7 years ago
committed by Adam Langley
parent
commit
8da870a9e0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      crypto/compiler_test.cc

+ 1
- 1
crypto/compiler_test.cc 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.


Loading…
Cancel
Save