Skip to content

Commit bd3d6ab

Browse files
authored
Merge pull request #2715 from pan-/NDEBUG_optimization
Allow the trace output by mbed error to be conditional of NDEBUG.
2 parents ad0b9c2 + 903afa3 commit bd3d6ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hal/common/mbed_error.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
#endif
2525

2626
WEAK void error(const char* format, ...) {
27+
#ifndef NDEBUG
2728
va_list arg;
2829
va_start(arg, format);
2930
mbed_error_vfprintf(format, arg);
3031
va_end(arg);
32+
#endif
3133
exit(1);
3234
}

0 commit comments

Comments
 (0)