Skip to content
Snippets Groups Projects
Commit 79672359 authored by Vedran Miletić's avatar Vedran Miletić
Browse files

Fix building with clang 3.5 (abs->std::abs, unused vars)

parent 3edd12c1
No related branches found
No related tags found
Loading
......@@ -170,23 +170,23 @@ RttMeanDeviation::CheckForReciprocalPowerOfTwo (double val) const
return 0;
}
// supports 1/32, 1/16, 1/8, 1/4, 1/2
if (abs (1/val - 8) < TOLERANCE)
if (std::abs (1/val - 8) < TOLERANCE)
{
return 3;
}
if (abs (1/val - 4) < TOLERANCE)
if (std::abs (1/val - 4) < TOLERANCE)
{
return 2;
}
if (abs (1/val - 32) < TOLERANCE)
if (std::abs (1/val - 32) < TOLERANCE)
{
return 5;
}
if (abs (1/val - 16) < TOLERANCE)
if (std::abs (1/val - 16) < TOLERANCE)
{
return 4;
}
if (abs (1/val - 2) < TOLERANCE)
if (std::abs (1/val - 2) < TOLERANCE)
{
return 1;
}
......
......@@ -27,6 +27,7 @@
#include "ns3/wave-net-device.h"
#include "ns3/minstrel-wifi-manager.h"
#include "ns3/radiotap-header.h"
#include "ns3/unused.h"
#include "wave-mac-helper.h"
#include "wave-helper.h"
......@@ -484,12 +485,7 @@ WaveHelper::Install (const WifiPhyHelper &phyHelper, const WifiMacHelper &macHe
try
{
const QosWaveMacHelper& qosMac = dynamic_cast<const QosWaveMacHelper&> (macHelper);
// below check will never fail, just used for survive from
// gcc warn "-Wunused-but-set-variable"
if (&qosMac == 0)
{
NS_FATAL_ERROR ("it could never get here");
}
NS_UNUSED (qosMac);
}
catch (const std::bad_cast &)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment