Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 May 2000 19:08:21 -0400 (EDT)
From:      Simon Shapiro <shimon@simon-shapiro.org>
To:        freebsd-current@freebsd.org
Subject:   One more question (different now)
Message-ID:  <XFMail.000509190821.shimon@simon-shapiro.org>

next in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000509190821.shimon>