From d04b813e8b078e717992b86b8b6103db0bd2cec3 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 19 Jul 2015 11:05:48 -0400 Subject: [PATCH] Cleared -Wmaybe-uninitialized under GCC 5.1 --- asn.cpp | 4 +++- zinflate.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/asn.cpp b/asn.cpp index 9a0c257b..3f88582c 100644 --- a/asn.cpp +++ b/asn.cpp @@ -74,7 +74,9 @@ bool BERLengthDecode(BufferedTransformation &bt, lword &length, bool &definiteLe bool BERLengthDecode(BufferedTransformation &bt, size_t &length) { - lword lw; + // Initialize to silence warning from diagnostic tools + lword lw = 0; + bool definiteLength; if (!BERLengthDecode(bt, lw, definiteLength)) BERDecodeError(); diff --git a/zinflate.cpp b/zinflate.cpp index 75175472..072ca267 100644 --- a/zinflate.cpp +++ b/zinflate.cpp @@ -402,7 +402,7 @@ void Inflator::DecodeHeader() HuffmanDecoder codeLengthDecoder(codeLengths, 19); for (i = 0; i < hlit+257+hdist+1; ) { - unsigned int k, count, repeater; + unsigned int k=0, count=0, repeater=0; bool result = codeLengthDecoder.Decode(m_reader, k); if (!result) throw UnexpectedEndErr();