From 2795574053f7addabf6fb8e3ed5d47c8a33b3c7a Mon Sep 17 00:00:00 2001 From: aoyama Date: Tue, 4 May 2021 14:05:12 +0000 Subject: [PATCH] Fix 2nd and 3rd arguments' cast in atomic_cas_ptr(). This fixes compile errors (actually warnings) on m88k in sys/net/pf.c revision 1.1116 changes. Diff from Miod Vallat, tested on GENERIC and GENERIC.MP by me. --- sys/arch/m88k/include/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/m88k/include/atomic.h b/sys/arch/m88k/include/atomic.h index 6ce3c0902d5..b4f078d2444 100644 --- a/sys/arch/m88k/include/atomic.h +++ b/sys/arch/m88k/include/atomic.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atomic.h,v 1.14 2018/08/22 11:25:58 aoyama Exp $ */ +/* $OpenBSD: atomic.h,v 1.15 2021/05/04 14:05:12 aoyama Exp $ */ /* Public Domain */ @@ -137,7 +137,7 @@ atomic_clear_int(volatile unsigned int *uip) ((unsigned long)atomic_cas_uint((unsigned int *)p, (unsigned int)o, \ (unsigned int)n)) #define atomic_cas_ptr(p,o,n) \ - ((void *)atomic_cas_uint((void *)p, (void *)o, (void *)n)) + ((void *)atomic_cas_uint((void *)p, (unsigned int)o, (unsigned int)n)) #define atomic_swap_ulong(p,o) \ ((unsigned long)atomic_swap_uint((unsigned int *)p, (unsigned int)o) -- 2.20.1