[poppler] poppler/UTF.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Tue Jan 9 23:42:26 UTC 2018


 poppler/UTF.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ebf33c2b0c66c456683c189af1b297fe24adcf9d
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Jan 10 00:40:38 2018 +0100

    utf16CountUtf8Bytes: initialize codepoint to 0
    
    Was tired of seeing the warning
    
    I actually think the code is a little bit fishy for invalid values,
    but since we only use it for win32 builds i'm not spending much more
    time looking at it.

diff --git a/poppler/UTF.cc b/poppler/UTF.cc
index e2f9b651..c00ddc51 100644
--- a/poppler/UTF.cc
+++ b/poppler/UTF.cc
@@ -331,7 +331,7 @@ inline uint32_t decodeUtf16(uint32_t* state, uint32_t* codePoint, uint16_t codeU
 // UTF-8 (excluding terminating NULL).
 int utf16CountUtf8Bytes(const uint16_t *utf16)
 {
-    uint32_t codepoint;
+    uint32_t codepoint = 0;
     uint32_t state = 0;
     int count = 0;
 


More information about the poppler mailing list