]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix typing mistakes in trace macros
authorAydın Mercan <aydin@isc.org>
Fri, 17 May 2024 13:45:10 +0000 (16:45 +0300)
committerEvan Hunt <each@isc.org>
Sat, 18 May 2024 01:11:23 +0000 (18:11 -0700)
The detach function declaration in `ISC__REFCOUNT_TRACE_DECL` had an
returned an accidental implicit int. While not allowed since C99, it
became an error by default in GCC 14.

`ISC_REFCOUNT_TRACE_IMPL` and `ISC_REFCOUNT_STATIC_TRACE_IMPL` expanded
into the wrong macros, trying to declare it again with the wrong number
of parameters.

lib/isc/include/isc/refcount.h

index ad361288b480c6cbf5d6bfe7e37cb53eba637518..090dc7ec2a7c0c4e382e12cad59af6c7ba8b7014 100644 (file)
@@ -127,7 +127,7 @@ typedef atomic_uint_fast32_t isc_refcount_t;
        stat void      name##__attach(name##_t *ptr, name##_t **ptrp,      \
                                      const char *func, const char *file,  \
                                      unsigned int line);                  \
-       stat           name##__detach(name##_t **ptrp, const char *func,   \
+       stat void      name##__detach(name##_t **ptrp, const char *func,   \
                                      const char *file, unsigned int line)
 
 #define ISC_REFCOUNT_BLANK
@@ -190,9 +190,9 @@ typedef atomic_uint_fast32_t isc_refcount_t;
        }
 
 #define ISC_REFCOUNT_TRACE_IMPL(name, destroy) \
-       ISC__REFCOUNT_TRACE_DECL(name, destroy, ISC_REFCOUNT_BLANK)
+       ISC__REFCOUNT_TRACE_IMPL(name, destroy, ISC_REFCOUNT_BLANK)
 #define ISC_REFCOUNT_STATIC_TRACE_IMPL(name, destroy) \
-       ISC__REFCOUNT_TRACE_DECL(name, destroy, static inline)
+       ISC__REFCOUNT_TRACE_IMPL(name, destroy, static inline)
 
 #define ISC__REFCOUNT_DECL(name, stat)                                      \
        stat name##_t *name##_ref(name##_t *ptr) __attribute__((unused));   \