From 66240b78d9ee8d4bbdfb3a5ccf9d87058cddf0de Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 8 May 2011 21:47:06 -0700 Subject: Make error handlint more robust in Format_Len_Unicode xprop.c:1011:2: warning: Function call argument is an uninitialized value memcpy(_formatting_buffer, error, strlen(error)+1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xprop.c:1011:36: note: instantiated from: memcpy(_formatting_buffer, error, strlen(error)+1); ^ ~~~~~ Found-by: clang static analysis Signed-off-by: Jeremy Huddleston --- xprop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xprop.c b/xprop.c index b870d97..4c4c702 100644 --- a/xprop.c +++ b/xprop.c @@ -999,6 +999,8 @@ Format_Len_Unicode (const char *string, int len) error = " "; break; case UTF8_LONG_TAIL: error = " "; break; + default: + error = ""; break; } result = Format_Len_String(string, len); -- cgit v1.2.3