From dc43d8a63993d0266c0d4e1b370243c3a69e22fd Mon Sep 17 00:00:00 2001 From: Undici77 Date: Tue, 4 Nov 2025 16:03:42 +0100 Subject: [PATCH 1/3] fix: __fallthrough macro for clang --- include/utils/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/utils/utils.h b/include/utils/utils.h index dfffe94..c5294f0 100644 --- a/include/utils/utils.h +++ b/include/utils/utils.h @@ -111,7 +111,7 @@ extern "C" { /* gcc attribute shorthands */ #ifndef __fallthrough -#if __GNUC__ >= 7 +#if __GNUC__ >= 7 || defined(__clang__) #define __fallthrough __attribute__((fallthrough)) #else #define __fallthrough From a99aa61c92d088652f2a6f921fd099f7cf1f2370 Mon Sep 17 00:00:00 2001 From: Undici77 Date: Tue, 18 Nov 2025 10:44:05 +0100 Subject: [PATCH 2/3] style(logger): add weak attribute to logger format function The `__weak` attribute was added to the `__logger_log` function to allow for weak symbol resolution in linking scenarios. --- src/logger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logger.c b/src/logger.c index 646d717..44aa66b 100644 --- a/src/logger.c +++ b/src/logger.c @@ -95,7 +95,7 @@ static int terminate_log_line(char *buf, int len) #define LOG_BUF_LEN 192 -__format_printf(5, 6) +__weak __format_printf(5, 6) int __logger_log(logger_t *ctx, int log_level, const char *file, unsigned long line, const char *fmt, ...) { @@ -111,7 +111,7 @@ int __logger_log(logger_t *ctx, int log_level, const char *file, unsigned long l { file = filename + 1; } - + if (!ctx->cb) { if (log_level < LOG_EMERG || log_level >= LOG_MAX_LEVEL || From c8860dc4da36f63da6a5c137a76860ba78d5fb69 Mon Sep 17 00:00:00 2001 From: "andrea.marinelli" Date: Thu, 19 Mar 2026 14:46:13 +0100 Subject: [PATCH 3/3] utils: Update preprocessor condition to include ESP_PLATFORM for ISO 8601 datetime function --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 367d79a..4951954 100644 --- a/src/utils.c +++ b/src/utils.c @@ -131,7 +131,7 @@ int add_iso8601_utc_datetime(char* buf, size_t size) return r; } -#elif defined(__linux__) || defined(__APPLE__) +#elif defined(__linux__) || defined(__APPLE__) || defined(ESP_PLATFORM) #include #include