Fix used-uninitialised warning in fmt_rfc2047.c
authorPeter Maydell <pmaydell@chiark.greenend.org.uk>
Mon, 20 Dec 2010 21:13:32 +0000 (21:13 +0000)
committerPeter Maydell <pmaydell@chiark.greenend.org.uk>
Mon, 20 Dec 2010 21:13:32 +0000 (21:13 +0000)
Fix a used-uninitialised warning in fmt_rfc2047.c.
I don't think it can actually be used uninitialised, but the
code is too complicated for the compiler to realise this.

Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>

sbr/fmt_rfc2047.c

index 6f208a1..4d3fc29 100644 (file)
@@ -236,6 +236,7 @@ decode_rfc2047 (char *str, char *dst, size_t dstlen)
            } else {
                /* base64 */
                int c1, c2, c3, c4;
+               c1 = c2 = c3 = c4 = -1;
 
                pp = startofmime;
                while (pp < endofmime) {