From 2bb28fdf12a00a61548c78bb14e207b32ecf733b Mon Sep 17 00:00:00 2001 From: Yorgos Thessalonikefs Date: Fri, 24 Oct 2025 14:44:58 +0200 Subject: [PATCH] - Fix unused attribute warning in redis.c when threads are not supported. --- cachedb/redis.c | 6 ++++++ doc/Changelog | 2 ++ 2 files changed, 8 insertions(+) diff --git a/cachedb/redis.c b/cachedb/redis.c index 9383f1c85..902497355 100644 --- a/cachedb/redis.c +++ b/cachedb/redis.c @@ -143,6 +143,12 @@ redis_connect(const char* host, int port, const char* path, { struct timeval now_val; redisContext* ctx; +#ifdef THREADS_DISABLED + /* Fix attribute unused warning. + * wait_lock is only used with lock_basic_* functions that are nop'ed + * when compiled without thread support. */ + (void)wait_lock; +#endif /* THREADS_DISABLED */ /* See if the redis server is down, and reconnect has to wait. */ if(*reconnect_attempts > REDIS_RECONNECT_ATTEMPT_LIMIT) { diff --git a/doc/Changelog b/doc/Changelog index 960827184..61474188a 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,8 @@ clauses and some reformatting around the use of "clause", "option" and "attributes". Based on Havard Eidnes' suggestions on the mailing list. + - Fix unused attribute warning in redis.c when threads are not + supported. 22 October 2025: Yorgos - Tag for 1.24.1 release. -- 2.47.3