]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Undo implict promotion to 64 bits in our Windows implementation of atomic_load_explic...
authorMark Andrews <marka@isc.org>
Tue, 2 Oct 2018 01:15:56 +0000 (11:15 +1000)
committerMark Andrews <marka@isc.org>
Wed, 3 Oct 2018 20:59:28 +0000 (06:59 +1000)
lib/isc/include/isc/refcount.h

index 2342531f678233099228f27f9502b81061054632..80ee9751aefbe782af1bd7c6389987f30a4e7f9e 100644 (file)
@@ -47,9 +47,13 @@ typedef atomic_uint_fast32_t isc_refcount_t;
  *  \brief Returns current number of references.
  *  \param[in] ref pointer to reference counter.
  *  \returns current value of reference counter.
+ *
+ *   Undo implict promotion to 64 bits in our Windows implementation of
+ *   atomic_load_explicit() by casting to uint_fast32_t.
  */
+
 #define isc_refcount_current(target)                           \
-       atomic_load_explicit(target, memory_order_relaxed)
+       (uint_fast32_t)atomic_load_explicit(target, memory_order_relaxed)
 
 /** \def isc_refcount_destroy(ref)
  *  \brief a destructor that makes sure that all references were cleared.