fixing unit test build

This commit is contained in:
rusefi 2018-01-22 19:53:13 -05:00
parent fe9d8ee0f7
commit a47ecdf726
1 changed files with 6 additions and 5 deletions

View File

@ -92,15 +92,11 @@ void addWarningCode(obd_code_e code) {
// todo: look into chsnprintf // todo: look into chsnprintf
// todo: move to some util file & reuse for 'firmwareError' method // 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 stream->eos = 0; // reset
chvprintf((BaseSequentialStream *) stream, fmt, ap); chvprintf((BaseSequentialStream *) stream, fmt, ap);
stream->buffer[stream->eos] = 0; stream->buffer[stream->eos] = 0;
} }
#else
int unitTestWarningCounter = 0;
#endif /* EFI_SIMULATOR || EFI_PROD_CODE */
static void printWarning(const char *fmt, va_list ap) { static void printWarning(const char *fmt, va_list ap) {
resetLogging(&logger); // todo: is 'reset' really needed here? resetLogging(&logger); // todo: is 'reset' really needed here?
@ -115,6 +111,11 @@ static void printWarning(const char *fmt, va_list ap) {
scheduleLogging(&logger); scheduleLogging(&logger);
} }
#else
int unitTestWarningCounter = 0;
#endif /* EFI_SIMULATOR || EFI_PROD_CODE */
/** /**
* OBD_PCM_Processor_Fault is the general error code for now * OBD_PCM_Processor_Fault is the general error code for now
* *