From a06b0673d8de6e65e8df00aafd2a7575adca6d38 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 9 Aug 2011 16:13:13 -0400 Subject: [PATCH] Fix some "'var' may be used uninitialized" warnings The one in WPrefs.app/Appearance.c is indirect: the function might be inlined and might return an uninitialized value, which causes gcc to complain that the caller might use that uninitialized return value. --- WPrefs.app/Appearance.c | 2 ++ util/wmmenugen_parse_xdg.c | 1 + 2 files changed, 3 insertions(+) diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index f2663826..47eafd43 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -704,6 +704,8 @@ static Pixmap renderMenu(_Panel * panel, WMPropList * texture, int width, int ih case MSTYLE_FLAT: pix = renderTexture(scr, texture, width, iheight * 4, NULL, RBEV_RAISED2); break; + default: + pix = None; } XFreeGC(dpy, gc); diff --git a/util/wmmenugen_parse_xdg.c b/util/wmmenugen_parse_xdg.c index 14fdee71..f39a83e8 100644 --- a/util/wmmenugen_parse_xdg.c +++ b/util/wmmenugen_parse_xdg.c @@ -320,6 +320,7 @@ static void getLocalizedStringValue(char **target, const char *line, int *match_ p = line; kstart = 0; sqbstart = 0; + sqbend = 0; locale = NULL; /* skip until after '=', mark if '[' and ']' is found */ -- 2.11.4.GIT