[Bug 269] Many compiler warnings with gcc 4.0

Paul TBBle Hampson Paul.Hampson at Pobox.com
Thu Sep 1 13:26:08 CEST 2005


On Wed, Aug 31, 2005 at 04:09:49PM -0400, Alan DeKok wrote:
>   Maybe since we're doing massive re-writes anyhow, we could have:

> VALUE_PAIR {
> 	 union {
> 	       char strvalue[];
> 	       uint8_t octets[];
> 	       ...	 
	 }} data;


Can we throw a couple of #defines in there too?
#define vp_strval data.strvalue
#define vp_octets data.octets
?

That way vp->vp_strval is a direct substitute for vp->strvalue. It carries a
risk of namespace pollution though.

(I'm not too fussed, I'm as happy as not with unions, but I know
some people dislike the extra component.)

Otherwise, an anonymous union might do it, if I recall correctly?

-- 
-----------------------------------------------------------
Paul "TBBle" Hampson, MCSE
8th year CompSci/Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
Paul.Hampson at Pobox.Com

Of course Pacman didn't influence us as kids. If it did,
we'd be running around in darkened rooms, popping pills and
listening to repetitive music.
 -- Kristian Wilson, Nintendo, Inc, 1989

License: http://creativecommons.org/licenses/by/2.1/au/
-----------------------------------------------------------



More information about the Freeradius-Devel mailing list