Bug 2736 - build warning for TypeId: enum constant in boolean context
build warning for TypeId: enum constant in boolean context
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
unspecified
All All
: P3 normal
Assigned To: Peter Barnes
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-07 11:25 UTC by Tom Henderson
Modified: 2017-06-01 19:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2017-05-07 11:25:01 UTC
gcc-7.1.0 complaint:

../src/network/model/node.cc: In static member function ‘static ns3::TypeId ns3::Node::GetTypeId()’:
../src/network/model/node.cc:70:48: error: enum constant in boolean context [-Werror=int-in-bool-context]
                    TypeId::ATTR_GET || TypeId::ATTR_SET,
                                                ^~~~~~~~
cc1plus: all warnings being treated as errors
Comment 1 Peter Barnes 2017-06-01 19:59:29 UTC
Fixed in r12902 7f77c2bc

(Was introduced in r11086 65914b1e Dec 2014)