From: aoyama Date: Tue, 4 May 2021 14:05:12 +0000 (+0000) Subject: Fix 2nd and 3rd arguments' cast in atomic_cas_ptr(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2795574053f7addabf6fb8e3ed5d47c8a33b3c7a;p=openbsd 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. --- 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)