summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/i386/include/atomic.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h
index 919bd5a..a54a5ab 100644
--- a/sys/i386/include/atomic.h
+++ b/sys/i386/include/atomic.h
@@ -368,7 +368,11 @@ atomic_cmpset_ptr(volatile void *dst, void *exp, void *src)
static __inline void *
atomic_load_acq_ptr(volatile void *p)
{
- return (void *)atomic_load_acq_int((volatile u_int *)p);
+ /*
+ * The apparently-bogus cast to intptr_t in the following is to
+ * avoid a warning from "gcc -Wbad-function-cast".
+ */
+ return ((void *)(intptr_t)atomic_load_acq_int((volatile u_int *)p));
}
static __inline void
OpenPOWER on IntegriCloud