From: Dan Scott Date: Sat, 5 May 2012 05:32:25 +0000 (-0400) Subject: LP954059: Silence uninitialized var warning X-Git-Tag: osrf_rel_2_2_0-alpha~45 X-Git-Url: https://git.evergreen-ils.org/?p=OpenSRF.git;a=commitdiff_plain;h=f56b12a2026fd02b5770fe8c9a39ad2b6eecf34c LP954059: Silence uninitialized var warning Compiling osrf_utf8.c generates the following warning: osrf_utf8.c:510:29: warning: utf8_char may be used uninitialized in this function [-Wuninitialized] So... initialize utf8_char when we declare it, and make the compiler happy. Signed-off-by: Dan Scott Signed-off-by: Galen Charlton --- diff --git a/src/libopensrf/osrf_utf8.c b/src/libopensrf/osrf_utf8.c index fe468d7..e83be28 100644 --- a/src/libopensrf/osrf_utf8.c +++ b/src/libopensrf/osrf_utf8.c @@ -346,7 +346,7 @@ typedef enum { */ int buffer_append_utf8( growing_buffer* buf, const char* string ) { utf8_state state = S_BEGIN; - unsigned long utf8_char; + unsigned long utf8_char = 0; const unsigned char* s = (unsigned char *) string; int i = 0; int rc = 0;