From 52c7839741d19134e5c20706cb928acc916c6bd3 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Sat, 2 May 2015 23:29:19 +0100 Subject: [PATCH] Initialize variable to silence warning [-Wsometimes-uninitialized] It's uninitialized if the else {} is hit. --- src/imageformats/rle_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageformats/rle_p.h b/src/imageformats/rle_p.h index 86fa051..71d6b2c 100644 --- a/src/imageformats/rle_p.h +++ b/src/imageformats/rle_p.h @@ -86,7 +86,7 @@ static inline bool decodeRLEData(RLEVariant variant, stream >> count1; if (count1 >= 128u) { - unsigned length; + unsigned length = 0; if (variant == RLEVariant::PIC) { if (count1 == 128u) { // If the value is exactly 128, it means that it is more than