Author: jpeach
Date: Sat Jan 28 05:21:39 2012
New Revision: 1236981

URL: http://svn.apache.org/viewvc?rev=1236981&view=rev
Log:
TS-1097: Ignore system(3) return code harder

Modified:
    trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc

Modified: trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc
URL: 
http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc?rev=1236981&r1=1236980&r2=1236981&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc (original)
+++ trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc Sat Jan 28 
05:21:39 2012
@@ -283,6 +283,14 @@ struct replace_colon
   }
 };
 
+static int
+xsystem(const char * cmd)
+{
+  // Some versions of glibc declare system(3) with the warn_unused_result
+  // attribute. Pretend to use the return value so it will shut the hell up.
+  return system(cmd);
+}
+
 int
 Cmd_Help(ClientData clientData, Tcl_Interp * interp, int argc, const char 
*argv[])
 {
@@ -310,7 +318,7 @@ Cmd_Help(ClientData clientData, Tcl_Inte
       << Layout::get()->datadir << "/trafficshell/" << topic << ".1";
 
     Cli_Debug("%s\n", cmd.str().c_str());
-    (void)system(cmd.str().c_str());
+    xsystem(cmd.str().c_str());
   }
 
   return CMD_OK;


Reply via email to