The only answer I've seen for this one is to kick, hard, whoever it was
that added -Wcast-qual to the kernel options. Or write your own,
suboptimal, bzero code.
> Hi Again,
>
> Since you were so kind to me, I will impose another
> one on you (the previous answers were _all_ correct! )
>
> Given:
>
> typedef struct junk {
> ...
> } junk_t
>
> volatile junk_t trash;
>
> What I want to do is zero out trash.
>
> bzero(trash, sizeof(junk_t));
>
> produces a warning about loss of volatility.
> So does:
>
> bzero((void *)&trash, sizeof(junk_t));
>
> So, how do I make everyone happy?
>
> Oh, the struct has to be volatile. Trust me on that one.
>
>
>
> Sincerely Yours
> 404.664.6401
> Simon Shapiro Research Fellow, Earthlink Inc.
>
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
>
> Hi Again,
>
> Since you were so kind to me, I will impose another
> one on you (the previous answers were _all_ correct! )
>
> Given:
>
> typedef struct junk {
> ...
> } junk_t
>
> volatile junk_t trash;
>
> What I want to do is zero out trash.
>
> bzero(trash, sizeof(junk_t));
>
> produces a warning about loss of volatility.
> So does:
>
> bzero((void *)&trash, sizeof(junk_t));
>
> So, how do I make everyone happy?
>
> Oh, the struct has to be volatile. Trust me on that one.
>
>
>
> Sincerely Yours
> 404.664.6401
> Simon Shapiro Research Fellow, Earthlink Inc.
>
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
>
--
\\ Give a man a fish, and you feed him for a day. \\ Mike Smith
\\ Tell him he should learn how to fish himself, \\ [EMAIL PROTECTED]
\\ and he'll hate you for a lifetime. \\ [EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message