[Bug 269] Many compiler warnings with gcc 4.0

Alan DeKok aland at ox.org
Thu Sep 1 19:08:33 CEST 2005


Paul TBBle Hampson <Paul.Hampson at Pobox.com> wrote:
> Can we throw a couple of #defines in there too?
> #define vp_strval data.strvalue
> #define vp_octets data.octets
> ?

  Yes.

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

  Try using "st_mtime" in your code.  The headers for the stat()
routine do the same thing.

> (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?

  I'm not sure how portable that is.

  In any case vp->vp_strvalue looks fine to me.  It also lets us do
vp->vp_ipv6addr and other things, which would be very good.

  Alan DeKok.



More information about the Freeradius-Devel mailing list