Bugzilla – Full Text Bug Listing |
Summary: | compile error on mac due to undefined uint16_t | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Brian Swenson <bswenson3> |
Component: | aodv | Assignee: | ns-bugs <ns-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | sebastien.deronne, tomh, tommaso.pecorella |
Priority: | P5 | ||
Version: | ns-3-dev | ||
Hardware: | PC | ||
OS: | Mac OS | ||
See Also: | https://www.nsnam.org/bugzilla/show_bug.cgi?id=2911 | ||
Attachments: |
patch to fix
revised patch to fix |
Description
Brian Swenson
2016-10-06 11:15:10 UTC
I encountered the same issue when starting from a new repo on my MacOS machine I believe it is an issue related to C++11 Created attachment 2709 [details]
patch to fix
patch attached that avoids std::pow usage Thanks. Why do you initializeTime retry to m_netTraversalTime, this will get anyway overwritten? (In reply to sebastien.deronne from comment #5) > Thanks. Why do you initializeTime retry to m_netTraversalTime, this will get > anyway overwritten? for the case when (rt.GetRreqCnt () <= 1) Tbh, GetRreqCnt returns a uint8_t. As a consequence if it's <= 1 it's either 0 or 1. If it's zero we should raise an assert. If it's 1, then "(1 << backoffFactor)" is 1 and the result what we would expect. Summarizing, using an if is a matter of personal taste in the code, I'm totally neutral. (In reply to Tom Henderson from comment #6) > (In reply to sebastien.deronne from comment #5) > > Thanks. Why do you initializeTime retry to m_netTraversalTime, this will get > > anyway overwritten? > > for the case when (rt.GetRreqCnt () <= 1) Created attachment 2710 [details]
revised patch to fix
revised patch to address the comments received
I will push shortly if no other comments. pushed in 13554:cf0f581e4155 |