fix some energy test compiler warnings

This commit is contained in:
Josh Pelkey
2010-07-08 11:04:25 -04:00
parent 2d87e8d326
commit f48a89b75c

View File

@@ -132,7 +132,7 @@ BasicEnergyUpdateTest::StateSwitchTest (
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 @@ BasicEnergyDepletionTest::DepletionTestCase (double simTimeS,
* 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