Bug 2749

Summary: Improper use of NS_ASSERT
Product: ns-3 Reporter: Peter Barnes <pdbarnes>
Component: wimaxAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: tomh
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: patch

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