From f56b12a2026fd02b5770fe8c9a39ad2b6eecf34c Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Sat, 5 May 2012 01:32:25 -0400 Subject: [PATCH] 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 --- src/libopensrf/osrf_utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0