From aa1149d5f944e44b2b33eb727e63ec4d592cbc30 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Sat, 24 Jan 2015 12:05:39 -0600 Subject: [PATCH] wmmenu: Fix -Wunused-result compiler warning. Print a warning message if system() fails. --- wmmenu/events.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wmmenu/events.c b/wmmenu/events.c index 8c44f55..0498635 100644 --- a/wmmenu/events.c +++ b/wmmenu/events.c @@ -31,6 +31,7 @@ Reparent and Destroy events are catched with StructureNotifyMask. #include "menu.h" #include "xobjects.h" #include "pixmaps.h" +#include "error.h" static bool BarShown = false ; static bool HideBarDelayed = false ; @@ -134,7 +135,11 @@ static void InvokeBar (int x, int y) 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); } } -- 2.11.4.GIT