wmmenu: Fix -Wunused-result compiler warning.

Print a warning message if system() fails.
This commit is contained in:
Doug Torrance 2015-01-24 12:05:39 -06:00 committed by Carlos R. Mafra
parent a29eaa2fb2
commit aa1149d5f9

View file

@ -31,6 +31,7 @@ Reparent and Destroy events are catched with StructureNotifyMask.
#include "menu.h" #include "menu.h"
#include "xobjects.h" #include "xobjects.h"
#include "pixmaps.h" #include "pixmaps.h"
#include "error.h"
static bool BarShown = false ; static bool BarShown = false ;
static bool HideBarDelayed = false ; static bool HideBarDelayed = false ;
@ -134,7 +135,11 @@ static void InvokeBar (int x, int y)
if (entry < Menu_GetNbEntries ()) if (entry < Menu_GetNbEntries ())
{ {
system (Menu_GetEntryCommand (entry)) ; const char *command;
command = Menu_GetEntryCommand (entry);
if (system (command) == -1)
warn("'%s' returned an error\n", command);
} }
} }