quiet compiler
authorAndrey Mazo <mazo@iitp.ru>
Thu, 03 Dec 2009 10:54:05 +0300
changeset 5834 8481618b577f
parent 5833 aa78abc9c10d
child 5835 6ea448122ee0
quiet compiler
src/contrib/stats/omnet-data-output.cc
src/devices/emu/emu-net-device.cc
--- a/src/contrib/stats/omnet-data-output.cc	Wed Dec 02 16:22:37 2009 -0800
+++ b/src/contrib/stats/omnet-data-output.cc	Thu Dec 03 10:54:05 2009 +0300
@@ -58,7 +58,8 @@
 
 inline bool isNumeric(const std::string& s) {
   char *endp;
-  strtod(s.c_str(), &endp);
+  double unused = strtod(s.c_str(), &endp); // declared with warn_unused_result
+  unused = unused; // quiet compiler
   return endp == s.c_str() + s.size();
 }
 
--- a/src/devices/emu/emu-net-device.cc	Wed Dec 02 16:22:37 2009 -0800
+++ b/src/devices/emu/emu-net-device.cc	Thu Dec 03 10:54:05 2009 +0300
@@ -718,6 +718,7 @@
 
     default:
       NS_FATAL_ERROR ("invalid encapsulation mode");
+      protocol = 0; /* quiet compiler */
     }
 
   PacketType packetType;