jsoncpp: Add initialization to pacify scanbuild

The scanbuild analysis cannot see that decodeUnicodeEscapeSequence
either initializes the `unicode` argument or returns `false` such
that the code following it runs only if `unicode` is initialized.
Add an explicit initialization to pacify it.
This commit is contained in:
Brad King 2017-08-29 08:31:59 -04:00
parent c103a959d1
commit 1a2b62b189

View File

@ -1728,6 +1728,7 @@ bool OurReader::decodeUnicodeCodePoint(Token& token,
Location end,
unsigned int& unicode) {
unicode = 0; // Convince scanbuild this is always initialized before use.
if (!decodeUnicodeEscapeSequence(token, current, end, unicode))
return false;
if (unicode >= 0xD800 && unicode <= 0xDBFF) {