diff --git a/src/logger.c b/src/logger.c index 2eb48e8..f7864f9 100644 --- a/src/logger.c +++ b/src/logger.c @@ -70,6 +70,9 @@ static inline void logger_log_set_color(logger_t *ctx, const char *color) assert(ret == len); ARG_UNUSED(ret); /* squash warning in Release builds */ } +#else + ARG_UNUSED(ctx); + ARG_UNUSED(color); #endif } diff --git a/src/utils.c b/src/utils.c index dc103ac..cae87ab 100644 --- a/src/utils.c +++ b/src/utils.c @@ -150,24 +150,31 @@ int add_iso8601_utc_datetime(char *buf, size_t size) #elif defined(__BARE_METAL__) +#ifndef _TIMEVAL_DEFINED struct timeval { long tv_sec; // seconds since epoch long tv_usec; // microseconds }; +#endif +#ifndef _TIMEZONE_DEFINED struct timezone { int tz_minuteswest; // minutes west of UTC int tz_dsttime; // daylight saving time flag }; +#endif int gettimeofday(struct timeval * tp, struct timezone * tzp) { + ARG_UNUSED(tzp); tp->tv_sec = 0; tp->tv_usec = 0; return 0; } int add_iso8601_utc_datetime(char* buf, size_t size) { + ARG_UNUSED(buf); + ARG_UNUSED(size); return 0; }