[ back to toc ]

'u16' is promoted to 'int' when passed through '...'

Date: 2002/02/01 08:43

Q:
Hi!

I've a little problem:
while I compile a programm, gcc says:

pjbproto.c: In function 'pjbproto_build_itemlist':
pjbproto.c:306: 'u16' is promoted to 'int' when passed through '...'
pjbproto.c:306: (so you should pass 'int' not 'u16' to 'va_arg')
pjbproto.c: In function 'pjbproto_parse_itemlist':
pjbproto.c:437: 'u16' is promoted to 'int' when passed through '...'
make[1]: *** [pjbproto.o] Error 1
make[1]: Leaving directory '/home/dvd/src/jukeboxmgr/PJB100/pjbapi'
make: *** [MakePJBLibs] Error 2

OK I know the problem, but I can't solve it!
I'be emailed with the author and he says this:

[...] so you should replace va_arg(u16) to (u16)va_arg(int) [...]

OK, looks very easy, but the funktion is defined so:

va_arg(marker,u16)

I don't know what to do with the marker...

(u16)va_arg(marker, int)

doesn't work...

can you halp me??

THANX!!

*NAME-DELETED*

A:
Could you send me the code fragment?

Regards,
Peter

[ back to toc ]