Quoth Carlos R. Mafra,

winmenu.c:578:14: warning: variable ‘entry’ set but not used
[-Wunused-but-set-variable]

  Doh!

  The attached patch should quieten that warning.
From 0d56ff0d22d8ee38ea1a228a99e823c7eb42dfb4 Mon Sep 17 00:00:00 2001
From: Iain Patterson <[email protected]>
Date: Sat, 19 Oct 2013 16:35:10 +0100
Subject: [PATCH 4/4] Compiler food.

The code to update the "Other maximization" menu's labels was moved from
makeMaximizeMenu() to updateMaximizeMenu(), making the WMenuEntry
pointer in the former function redundant.
---
 src/winmenu.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/winmenu.c b/src/winmenu.c
index 5d56759..6335ae8 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -575,7 +575,6 @@ static WMenu *makeOptionsMenu(WScreen * scr)
 static WMenu *makeMaximizeMenu(WScreen * scr)
 {
        WMenu *menu;
-       WMenuEntry *entry;
 
        menu = wMenuCreate(scr, NULL, False);
        if (!menu) {
@@ -583,17 +582,17 @@ static WMenu *makeMaximizeMenu(WScreen * scr)
                return NULL;
        }
 
-       entry = wMenuAddCallback(menu, _("Maximize vertically"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize horizontally"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize left half"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize right half"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize top half"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize bottom half"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize left top corner"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize right top corner"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize left bottom corner"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximize right bottom corner"), 
execMaximizeCommand, NULL);
-       entry = wMenuAddCallback(menu, _("Maximus: tiled maximization"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize vertically"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize horizontally"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize left half"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize right half"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize top half"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize bottom half"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize left top corner"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize right top corner"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize left bottom corner"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximize right bottom corner"), 
execMaximizeCommand, NULL);
+       (void) wMenuAddCallback(menu, _("Maximus: tiled maximization"), 
execMaximizeCommand, NULL);
 
        return menu;
 }
-- 
1.8.3.1

Reply via email to