Skip to content

Commit c08c9b9

Browse files
committed
ase/logging.cc: add missing NDEBUG check
Signed-off-by: Tim Janik <timj@gnu.org>
1 parent 7eca4f6 commit c08c9b9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ase/logging.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ logging_configure (bool to_file, Logging level)
222222

223223
// == Stacktrace ==
224224
/// Find GDB and construct command line
225-
static std::string
225+
[[maybe_unused]] static std::string
226226
backtrace_command (const char *dbgr)
227227
{
228228
#if 0 && defined (__linux__)
@@ -299,6 +299,7 @@ debug_key_value (const char *conditional)
299299
return String (sv);
300300
}
301301

302+
#ifndef NDEBUG
302303
static void
303304
print_backtrace (FILE *stdio, const std::vector<void*> &frames)
304305
{
@@ -338,6 +339,7 @@ print_backtrace (FILE *stdio, const std::vector<void*> &frames)
338339
}
339340
free (symbols);
340341
}
342+
#endif // NDEBUG
341343

342344
/// Print confiogurable stack trace.
343345
static void

0 commit comments

Comments
 (0)