[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Roxen2 (was: Packages not making it into testing)

Anthony Towns <aj@azure.humbug.org.au> writes:

> > ----- s n i p -----
> > Fixing that (using a temporary int/uint to hold the va_arg before
> > downcasting it to a short) seems to produce a binary, actually.
> > ----- s n i p -----
> > 'seems to produce', but does it work? Is this the 'correct' fix?
> It's the correct fix for that problem. There may be other problems. 

Actually, it's a bit more than is necessary.  You don't need a
temporary int/uint.  Just pass int/uint to va_arg and cast down to a
short like

shortArg = (short) va_arg(arg, int);

(Actually, I don't even think you need the cast there.)

Do you know of some reason you'd need the temporary?

Alan Shutko <ats@acm.org> - In a variety of flavors!
A man's house is his hassle.

Reply to: