Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/arch/powerpc/conf
> cannot be compiled with -Wno-cast-qual due to a volatile pointer
> being passed to memset(), and there's no easy way other than open-
> coding memset() to fix this
How about __UNVOLATILE?
best regards
Matthias
Index: tc/px.c
===================================================================
RCS file: /cvsroot/src/sys/dev/tc/px.c,v
retrieving revision 1.23
diff -u -r1.23 px.c
--- tc/px.c 27 Feb 2005 00:27:49 -0000 1.23
+++ tc/px.c 2 Jun 2005 13:08:57 -0000
@@ -378,7 +378,8 @@
}
sxc = si->si_sxc;
- memset((void *)sxc->sxc_done, 0, sizeof(sxc->sxc_done));
+#define UNVOLATILE(a) ((void *)(unsigned long)(volatile void *)(a))
+ memset(UNVOLATILE(sxc->sxc_done), 0, sizeof(sxc->sxc_done));
sxc->sxc_head = 0;
sxc->sxc_tail = 0;
sxc->sxc_nreject = 0;
Home |
Main Index |
Thread Index |
Old Index