diff options
author | Brad King <brad.king@kitware.com> | 2017-08-29 12:31:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-30 14:17:17 (GMT) |
commit | 1a2b62b189365061056497b4a9fdc73cde7e91ed (patch) | |
tree | 61a8f7b63a0e316db8e76e5d3bd79b1b502998a2 /Utilities | |
parent | c103a959d12e810bb3eb8a8f155a171944d6a1ea (diff) | |
download | CMake-1a2b62b189365061056497b4a9fdc73cde7e91ed.zip CMake-1a2b62b189365061056497b4a9fdc73cde7e91ed.tar.gz CMake-1a2b62b189365061056497b4a9fdc73cde7e91ed.tar.bz2 |
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.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmjsoncpp/src/lib_json/json_reader.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Utilities/cmjsoncpp/src/lib_json/json_reader.cpp b/Utilities/cmjsoncpp/src/lib_json/json_reader.cpp index 0886dab..0249cc9 100644 --- a/Utilities/cmjsoncpp/src/lib_json/json_reader.cpp +++ b/Utilities/cmjsoncpp/src/lib_json/json_reader.cpp @@ -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) { |