From 20dab9d4f1ce6cc6dde8459642266828e0bd3ff3 Mon Sep 17 00:00:00 2001 From: Christian Griebel Date: Thu, 6 Nov 2025 14:33:45 +0100 Subject: [PATCH] Avoid unused variable warnings in case __ASSERT evaluates to NOP. --- src/osdp_cp.c | 2 ++ src/osdp_pd.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/osdp_cp.c b/src/osdp_cp.c index a2d16de3..d3f0e693 100644 --- a/src/osdp_cp.c +++ b/src/osdp_cp.c @@ -181,6 +181,8 @@ static inline void assert_buf_len(int need, int have) { __ASSERT(need < have, "OOM at build command: need:%d have:%d", need, have); + (void)need; + (void)have; } static int cp_build_command(struct osdp_pd *pd, uint8_t *buf, int max_len) diff --git a/src/osdp_pd.c b/src/osdp_pd.c index 6d289c1d..15414074 100644 --- a/src/osdp_pd.c +++ b/src/osdp_pd.c @@ -748,6 +748,8 @@ static inline void assert_buf_len(int need, int have) { __ASSERT(need < have, "OOM at build command: need:%d have:%d", need, have); + (void)need; + (void)have; } /**