From 795088a131be84ae7ca0e64a661b49139a7ca370 Mon Sep 17 00:00:00 2001 From: Sympatron GmbH <35803463+Sympatron@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:35:34 +0100 Subject: [PATCH] Fix unused args errors in release builds --- src/logger.c | 3 +++ src/utils.c | 3 +++ 2 files changed, 6 insertions(+) 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..827834d 100644 --- a/src/utils.c +++ b/src/utils.c @@ -162,12 +162,15 @@ struct timezone { 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; }