LP#1243841 - Quiet unused return value warning in srfsh.c
authorChris Sharp <csharp@georgialibraries.org>
Wed, 20 Sep 2017 00:46:28 +0000 (20:46 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 7 May 2018 20:09:53 +0000 (16:09 -0400)
Using the technique described here: https://stackoverflow.com/a/13999461.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

src/srfsh/srfsh.c

index e3705a9..1887bac 100644 (file)
@@ -383,7 +383,7 @@ static int process_request( const char* request ) {
 
        else if ( request[0] == '!') {
                if (!no_bang) {
-                       system( request + 1 );
+                       (void) (system( request + 1 )+1);
                        ret_val = 1;
                }
        }