Skip to content

Commit

Permalink
EASY: silence narrowing warning for signed char
Browse files Browse the repository at this point in the history
Summary:
`char` is unsigned in some configurations, so an explicit cast is
needed.

Reviewed By: neildhar

Differential Revision: D55997849

fbshipit-source-id: 6fdebbf6e3393c8e22b548da015700be1e41bf77
  • Loading branch information
Tzvetan Mikov authored and facebook-github-bot committed Apr 11, 2024
1 parent c2f7dcd commit d77f1b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unittests/VMRuntime/Base64UtilTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ TEST_F(Base64UtilTest, DecodeInvalid) {
CallResult<StringBuilder> builder =
StringBuilder::createStringBuilder(runtime, outputLength);

std::array<char, 5> hasNegative = {'A', 'b', 'c', -15, '\0'};
std::array<char, 5> hasNegative = {'A', 'b', 'c', (char)-15, '\0'};
EXPECT_FALSE(base64Decode(createASCIIRef(hasNegative.data()), *builder));

EXPECT_FALSE(base64Decode(createASCIIRef("==="), *builder));
Expand Down

0 comments on commit d77f1b6

Please sign in to comment.