Bug 2749 - Improper use of NS_ASSERT
Improper use of NS_ASSERT
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wimax
ns-3-dev
All All
: P3 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-01 20:06 UTC by Peter Barnes
Modified: 2017-06-02 20:15 UTC (History)
1 user (show)

See Also:


Attachments
patch (1.17 KB, patch)
2017-06-01 20:06 UTC, Peter Barnes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Barnes 2017-06-01 20:06:27 UTC
Created attachment 2861 [details]
patch

gcc-7 complained about two asserts in src/wimax/model/ss-net-device.cc:

  NS_ASSERT_MSG (SS_STATE_WAITING_RNG_RSP, ...

(The token is an enumerator.)

I believe this should be (full patch attached)

  NS_ASSERT_MSG (GetState () == SS_STATE_WAITING_RNG_RSP, ...

I'm hesitant to push this, however, because I don't know this code at all.
Comment 1 Tom Henderson 2017-06-02 19:39:42 UTC
please push, it looks correct to me
Comment 2 Peter Barnes 2017-06-02 20:15:56 UTC
Fixed in r12906 98ce80ed