]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix unused attribute warning in redis.c when threads are not
authorYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Fri, 24 Oct 2025 12:44:58 +0000 (14:44 +0200)
committerYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Fri, 24 Oct 2025 12:44:58 +0000 (14:44 +0200)
  supported.

cachedb/redis.c
doc/Changelog

index 9383f1c8576c845d87a91d9bc31c36d738e82ae8..902497355d28c2991b187b15dbc45708a7ae144d 100644 (file)
@@ -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) {
index 960827184d28cfd58c2866b4619d24b1e3b95bca..61474188ab13ef2b46c902a8811dc67460e3fcda 100644 (file)
@@ -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.