diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-06 03:51:24 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-06 03:51:24 +0000 |
commit | 3ce862b66ea11641e1907b879b98eaf22299f95e (patch) | |
tree | 3092dd6f689b783883392dd7dccd21094699662b /ace/Trace.cpp | |
parent | 11cb576692c0761e7eeeb82e543ef6b367441c29 (diff) | |
download | ATCD-3ce862b66ea11641e1907b879b98eaf22299f95e.tar.gz |
added if NDEBUG protection to some local variables and ACE_UNUSED_ARG to some parameters to avoid compiler warnings when ACE_DEBUG is disabled.
Diffstat (limited to 'ace/Trace.cpp')
-rw-r--r-- | ace/Trace.cpp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/ace/Trace.cpp b/ace/Trace.cpp index ae71de33cd8..16f8c9af79c 100644 --- a/ace/Trace.cpp +++ b/ace/Trace.cpp @@ -1,4 +1,3 @@ -// Trace.cpp // $Id$ // We need this to get the status of ACE_NTRACE... @@ -82,23 +81,28 @@ ACE_Trace::set_nesting_indent (int indent) // the LINE, and the ACE_FILE as the function is entered. ACE_Trace::ACE_Trace (const ASYS_TCHAR *n, - int line, - const ASYS_TCHAR *file) + int line, + const ASYS_TCHAR *file) { +#if defined (ACE_NDEBUG) + ACE_UNUSED_ARG (line); + ACE_UNUSED_ARG (file); +#endif /* ACE_NDEBUG */ + this->name_ = n; if (ACE_Trace::enable_tracing_) { ACE_Log_Msg *lm = ACE_LOG_MSG; if (lm->tracing_enabled () - && lm->trace_active () == 0) - { - lm->trace_active (1); - ACE_DEBUG ((LM_TRACE, ASYS_TEXT ("%*s(%t) calling %s in file `%s' on line %d\n"), - ACE_Trace::nesting_indent_ * lm->inc (), - ASYS_TEXT (""), this->name_, file, line)); - lm->trace_active (0); - } + && lm->trace_active () == 0) + { + lm->trace_active (1); + ACE_DEBUG ((LM_TRACE, ASYS_TEXT ("%*s(%t) calling %s in file `%s' on line %d\n"), + ACE_Trace::nesting_indent_ * lm->inc (), + ASYS_TEXT (""), this->name_, file, line)); + lm->trace_active (0); + } } } @@ -111,13 +115,13 @@ ACE_Trace::~ACE_Trace (void) { ACE_Log_Msg *lm = ACE_LOG_MSG; if (lm->tracing_enabled () - && lm->trace_active () == 0) - { - lm->trace_active (1); - ACE_DEBUG ((LM_TRACE, ASYS_TEXT ("%*s(%t) leaving %s\n"), - ACE_Trace::nesting_indent_ * lm->dec (), - ASYS_TEXT (""), this->name_)); - lm->trace_active (0); - } + && lm->trace_active () == 0) + { + lm->trace_active (1); + ACE_DEBUG ((LM_TRACE, ASYS_TEXT ("%*s(%t) leaving %s\n"), + ACE_Trace::nesting_indent_ * lm->dec (), + ASYS_TEXT (""), this->name_)); + lm->trace_active (0); + } } } |