From 77359686b0e0d181c5b36902980a3aef7db6804d Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Sun, 23 Aug 2015 23:28:00 -0400 Subject: [PATCH] wmload: Fix -Wunused-result compiler warning. Obtained from the Debian package [1]. [1] https://sources.debian.net/src/wmload/0.9.6-1/debian/patches/fix_unused_result.patch/ --- wmload/wmload.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wmload/wmload.c b/wmload/wmload.c index c30f7bf..eeab18b 100644 --- a/wmload/wmload.c +++ b/wmload/wmload.c @@ -145,7 +145,9 @@ void ExecuteExternal() ruid = getuid(); euid = geteuid(); if ( ruid == euid ) { - system( Execute ); + if (system( Execute ) == -1) + fprintf(stderr, "system(%s) returned an error", + Execute); return; } pid = fork(); @@ -171,7 +173,8 @@ void ExecuteExternal() strerror(errno)); exit(127); } - system( Execute ); + if (system( Execute ) == -1) + fprintf(stderr, "system(%s) returned an error", Execute); exit(0); } int main(int argc,char *argv[])