mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2715 from pan-/NDEBUG_optimization
Allow the trace output by mbed error to be conditional of NDEBUG.pull/2808/head
commit
bd3d6abbc4
|
@ -24,9 +24,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WEAK void error(const char* format, ...) {
|
WEAK void error(const char* format, ...) {
|
||||||
|
#ifndef NDEBUG
|
||||||
va_list arg;
|
va_list arg;
|
||||||
va_start(arg, format);
|
va_start(arg, format);
|
||||||
mbed_error_vfprintf(format, arg);
|
mbed_error_vfprintf(format, arg);
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
|
#endif
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue