fix some energy test compiler warnings
authorJosh Pelkey <jpelkey@gatech.edu>
Thu, 08 Jul 2010 11:04:25 -0400
changeset 6430 cfbd2029c0ce
parent 6429 5ee11b58989d
child 6431 1ec36006ecd6
fix some energy test compiler warnings
src/contrib/energy/test/basic-energy-model-test.cc
--- a/src/contrib/energy/test/basic-energy-model-test.cc	Wed Jul 07 21:54:32 2010 -0700
+++ b/src/contrib/energy/test/basic-energy-model-test.cc	Thu Jul 08 11:04:25 2010 -0400
@@ -132,7 +132,7 @@
   Ptr<BasicRadioEnergyModel> devModel =
     DynamicCast<BasicRadioEnergyModel> (modelList[0]);
   // check pointer
-  NS_TEST_ASSERT_MSG_NE (NULL, devModel, "NULL pointer to device model!");
+  NS_TEST_ASSERT_MSG_NE (0, devModel, "NULL pointer to device model!");
 
   // schedule change of state
   Simulator::Schedule (Seconds (m_timeS),
@@ -315,7 +315,7 @@
    * the floor here because initial update is at time = 0.
    */
   double tmp = ceil (simTimeS / updateIntervalS);
-  int numOfUpdates = (tmp == 0) ? 1 : tmp;
+  int numOfUpdates = (tmp == 0) ? 1 : static_cast<int> (tmp);
   /*
    * Every update will trigger *all* DeviceEnergyModels to react, therefore the
    * total count should be numOfUpdates * m_numOfModels ^ 2