summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2018-12-11 20:31:34 -0500
committer GitHub <noreply@github.com>2018-12-11 20:31:34 -0500
commit3045bdb804ebb05b18122ee287c8760038d41e8c (patch)
treef51bbb61d16da3f40b297c619368851d1ca6c820
parent9f4fc823d48860705c2bea67654ad6ba8615f165 (diff)
parent2f70f9698efc59e01ba6f47315ea736ecc2a5341 (diff)
Merge pull request #4389 from Celelibi/fix-maybe-uninitialized-Og1
Fix compilation errors with -Og
-rw-r--r--scripts/src/3rdparty.lua3
-rw-r--r--src/lib/util/png.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 2ccfa749e19..431507005bc 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -203,6 +203,9 @@ buildoptions {
}
configuration { }
+buildoptions {
+ "-Wno-error=maybe-uninitialized"
+}
defines {
"SOFTFLOAT_ROUND_ODD",
"INLINE_LEVEL=5",
diff --git a/src/lib/util/png.cpp b/src/lib/util/png.cpp
index 0a3b616b01f..6b13f4f9593 100644
--- a/src/lib/util/png.cpp
+++ b/src/lib/util/png.cpp
@@ -705,7 +705,7 @@ public:
{
// read a chunk
std::unique_ptr<std::uint8_t []> chunk_data;
- std::uint32_t chunk_type, chunk_length;
+ std::uint32_t chunk_type = 0, chunk_length;
error = read_chunk(fp, chunk_data, chunk_type, chunk_length);
if (PNGERR_NONE == error)
{