Commit Graph

18 Commits

Author SHA1 Message Date
Andrey Mazo
210aefc777 Bug 1170: Formulate best practices for dealing with unused debug variables.
Fixed clang-3.4 unused function warnings in optimized builds like the following:
"""
../examples/energy/energy-model-example.cc:39:1: error: unused function
'PrintReceivedPacket' [-Werror,-Wunused-function]
PrintReceivedPacket (Address& from)
^
1 error generated.
"""

Implemented "if (false)" trick inside NS_LOG* macros for optimized builds.

"sizeof()" trick might be a little better but it produces the following
warning with clang-3.4:
"""
../examples/energy/energy-model-example.cc:39:1: error: function
'PrintReceivedPacket' is not needed and will not be emitted
[-Werror,-Wunneeded-internal-declaration]
PrintReceivedPacket (Address& from)
^
1 error generated.
"""


Macros from log.h, that depend on NS3_LOG_ENABLE, were moved to log-macros-enabled.h and log-macros-disabled.h to make log.h smaller.
2014-03-23 19:08:54 +04:00
Peter D. Barnes, Jr.
a274c8ea37 [doxygen] Make introspected lists more visible, various other doxy 2014-03-10 10:57:50 -07:00
Peter D. Barnes, Jr.
104ff32b23 [doxygen] Stop warnings from NS_LOG_COMPONENT_DEFINE and NS_OBJECT_ENSURE_REGISTERED 2014-03-05 16:55:49 -08:00
Peter D. Barnes, Jr.
3ec3b6a878 [Bug 1862] NS_LOG="Time=*|prefix_time" causes stack overflow 2014-02-21 16:27:43 -08:00
Peter D. Barnes, Jr.
22e31f0c68 [Bug 1792] [Bug 1853] Remove inheritance from std::stream in ParameterLogger 2014-02-21 16:25:43 -08:00
Peter D. Barnes, Jr.
8ef0956af1 [Bug 1496] Finish the documentation.
Also amended scratch-simulator so printing the list of log
components works as advertised.
2013-12-12 14:42:43 -08:00
Peter D. Barnes, Jr.
5a2488e6db [doxygen] Suppress "warning: Member NS_LOG_COMPONENT_DEFINE is not documented" 2013-11-14 16:58:56 -08:00
Peter D. Barnes, Jr.
f6e90ca97a [bug 1552] Storing log name inside LogComponent class (NS_LOG) as std::string 2013-10-28 14:50:08 -07:00
Peter D. Barnes, Jr.
cc6fe300ac bug 1531: Crash when using NS_LOG in destructors of static objects 2012-12-08 21:44:45 -08:00
Peter D. Barnes, Jr.
5576b89677 [Bug 1496] Print the LOG_LEVEL (severity) in NS_LOG messages. 2012-11-05 12:10:55 -08:00
Peter D. Barnes, Jr.
e931a8f423 Document preferred usage of NS_LOG_FUNCTION() and
NS_LOG_FUNCTION_NOARGS()
2012-08-20 11:54:03 -07:00
Mathieu Lacage
92ca264982 bug 1244: Seg Faults in optimized builds due to missing Logging components 2011-08-11 08:43:45 -04:00
Vedran Miletic
7271e9fa6f bug 1203: Inconsistently named ifndef/define macros in ns-3 headers 2011-07-07 04:31:52 -04:00
Tom Henderson
2a2690a003 rerun check-style.py at default level to enforce space after function name 2011-05-22 23:18:47 -07:00
Tom Henderson
34688f76ec rerun check-style.py with uncrustify-0.58 2011-05-22 22:28:15 -07:00
Josh Pelkey
86379fa5b5 core coding style changes 2011-05-13 14:52:27 -04:00
Mathieu Lacage
7e5645edc0 making NS3_LOGGING_ENABLE control macro expansion and nothing more 2011-04-11 15:38:09 +02:00
Tom Henderson
df07734f32 merge src/simulator into src/core; move src/core to new module layout 2011-02-18 16:05:39 -08:00