From d9296ff9a4f3e769f7884c43aefbad57f172493c Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 9 Aug 2011 16:13:12 -0400 Subject: [PATCH] Remove warning in wmagnify.c (correctly) The problem with f65b99e615847 was that it removed the call to newWindow() along with the unused variable, without considering that newWindow() has side effects that need to happen even if the return value is ignored. So as long as we keep the newWindow() call, we can safely remove the (unused) variable. --- util/wmagnify.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/wmagnify.c b/util/wmagnify.c index d65d540f..3bb7a372 100644 --- a/util/wmagnify.c +++ b/util/wmagnify.c @@ -397,7 +397,6 @@ static BufferData *newWindow(int magfactor) int main(int argc, char **argv) { - BufferData *data; int i; char *display = ""; char *vdisplay = NULL; @@ -481,7 +480,7 @@ int main(int argc, char **argv) cursorColor1 = WMCreateNamedColor(scr, "#ff0000", False); cursorColor2 = WMCreateNamedColor(scr, "#00ff00", False); - data = newWindow(magfactor); + newWindow(magfactor); WMScreenMainLoop(scr);