summaryrefslogtreecommitdiff
path: root/dev-cpp/jsoncons/files/jsoncons-1.3.2-uninitialized.patch
blob: 936d9eec8e3d5b541f703a5c3b8f096211314558 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Fix error: ‘c’ may be used uninitialized [-Werror=maybe-uninitialized]
https://github.com/danielaparker/jsoncons/pull/628

--- a/include/jsoncons/source.hpp
+++ b/include/jsoncons/source.hpp
@@ -767,7 +767,7 @@ namespace jsoncons {
                 std::size_t actual = 0;
                 while (actual < n)
                 {
-                    typename Source::value_type c;
+                    typename Source::value_type c{};
                     if (source.read(&c,1) != 1)
                     {
                         break;