mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user