Turning off "warnings as errors" for unused variables

1,856 views
Skip to first unread message

Antti Mäkelä

unread,
Aug 17, 2009, 9:53:05 AM8/17/09
to ns-3-users
How can I turn off "warnings as errors" toggle in waf?

Mostly this comes up when I'm debugging stuff, for example for testing
I have replaced my Exponential and NormalVariables with
ConstantVariables. However, it's annoying that I have to start
commenting out more stuff (mostly variable names), just because
compiler says

error: unused variable 'avgdowntime'

and similar stuff.

How do I turn off this feature? I don't want those warnings to be
errors.

Guillaume Seguin

unread,
Aug 17, 2009, 9:56:30 AM8/17/09
to ns-3-users
You can define your own CXXFLAGS variable at configure time like :

CXXFLAGS="-W -Wall -g" ./waf configure

The flag which leads to treating warnings as errors is -Werror, so
just ommit it if you really want :)

Guillaume
Reply all
Reply to author
Forward
0 new messages