PPC: initializing array to fix compiler error maybe-uninitialized

This error is specific to PPC on native(sim builds fine), seems
     AddHexEncodedToBuffer is inlined (with -fno-inline it passes)
     and the compiler emits error that the array may be used
     uninitialized in this function.
     I'm not entirely sure why this occurs only on PPC (native).

R=franzih@chromium.org, bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2019113002
Cr-Commit-Position: refs/heads/master@{#36628}
This commit is contained in:
bjaideep 2016-05-31 21:21:10 -07:00 committed by Commit bot
parent 0d868a108b
commit 0e5c6a4bb9

View File

@ -241,7 +241,7 @@ void AddHexEncodedToBuffer(uint8_t octet, List<uint8_t>* buffer) {
}
void EncodeSingle(uc16 c, List<uint8_t>* buffer) {
char s[4];
char s[4] = {};
int number_of_bytes;
number_of_bytes =
unibrow::Utf8::Encode(s, c, unibrow::Utf16::kNoPreviousCharacter, false);