Actually I just discoverd that you can do:
int function (volatile const *);
(I guess you say you will not writ eto it, but that it may change of its
own volition at times)
anyhow setting this in bcopy would remove a heck of a lot of warnings
in the kernel.
On Thu, 6 Sep 2001, John Baldwin wrote:
>
> On 07-Sep-01 Julian Elischer wrote:
> >
> > Here is a hack to remove the 20 or so warning messages from if_ie.c
> >
> > Most of them are due to the supply of volatile pointers to bcopy and
> > bzero.
> >
> > I do the following to produce macros that call bzero and bcopy, but
> > don't produce
> > warning messages when called with volatile arguments.
> >
> >
> > typedef void Xcopy( void volatile *, void volatile *, int);
> >#define VBCOPY(A,B,L) (*(Xcopy *)&bcopy)((A),(B),(L))
> > typedef void Xzero( void volatile *, int);
> >#define VBZERO(A,L) (*(Xzero *)&bzero)((A),(L))
>
> sys/cdef.h already has some rather general purpose macros for thsi sort of
> thing in the form of __DEVOLATILE(), __DECONST(), and __DEQUALIFY().
thanks,
I'll go look at them.
>
> --
>
> John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
> PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
> "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message