diff --git a/firmware/controllers/error_handling.cpp b/firmware/controllers/error_handling.cpp index bfdbe35603..0dbbc03cd5 100644 --- a/firmware/controllers/error_handling.cpp +++ b/firmware/controllers/error_handling.cpp @@ -92,15 +92,11 @@ void addWarningCode(obd_code_e code) { // todo: look into chsnprintf // todo: move to some util file & reuse for 'firmwareError' method -void printToStream(MemoryStream *stream, const char *fmt, va_list ap) { +static void printToStream(MemoryStream *stream, const char *fmt, va_list ap) { stream->eos = 0; // reset chvprintf((BaseSequentialStream *) stream, fmt, ap); stream->buffer[stream->eos] = 0; } -#else -int unitTestWarningCounter = 0; - -#endif /* EFI_SIMULATOR || EFI_PROD_CODE */ static void printWarning(const char *fmt, va_list ap) { resetLogging(&logger); // todo: is 'reset' really needed here? @@ -115,6 +111,11 @@ static void printWarning(const char *fmt, va_list ap) { scheduleLogging(&logger); } +#else +int unitTestWarningCounter = 0; + +#endif /* EFI_SIMULATOR || EFI_PROD_CODE */ + /** * OBD_PCM_Processor_Fault is the general error code for now *