From b74b9c5037c37c42c3337608774c8b0ed2611bbc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Nov 2004 19:03:17 +0000 Subject: r3857: Shut up gcc about erroneous "used uninitialised" warning. Jeremy. (This used to be commit ac9b91d805c3ee68119d4b25ab05ed043f0ab8f1) --- source3/lib/charcnv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 0fe1f15ed5..95e24609cd 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -372,7 +372,7 @@ size_t convert_string(charset_t from, charset_t to, unsigned char *q = (unsigned char *)dest; size_t slen = srclen; size_t dlen = destlen; - unsigned char lastp; + unsigned char lastp = '\0'; size_t retval = 0; /* If all characters are ascii, fast path here. */ @@ -408,7 +408,7 @@ size_t convert_string(charset_t from, charset_t to, size_t retval = 0; size_t slen = srclen; size_t dlen = destlen; - unsigned char lastp; + unsigned char lastp = '\0'; /* If all characters are ascii, fast path here. */ while (((slen == (size_t)-1) || (slen >= 2)) && dlen) { @@ -444,7 +444,7 @@ size_t convert_string(charset_t from, charset_t to, size_t retval = 0; size_t slen = srclen; size_t dlen = destlen; - unsigned char lastp; + unsigned char lastp = '\0'; /* If all characters are ascii, fast path here. */ while (slen && (dlen >= 2)) { -- cgit