Bruce Korb wrote:

> Or apply a cast to all integer type arguments?  Holy moly, what a lot
> of pain just to print a number....

Yes, truly portable C sure is a headache at times.  Rather than casts I
think I would just make colCt an unsigned int and use %u.  Worst case,
on a target with 16 bit int you would be limited to 65535 columns of
indentation, but that scenario doesn't seem very likely.

For the record, the idea of changing uint32_t et al on Cygwin to use int
instead of long for their typedefs to more align things with Linux and
quash these sorts of warnings has been recently discussed on the mailing
list.  One of the counterarguments was that it does highlight these
portability issues that would go otherwise unnoticed.  Of course, in
this case while the warning is correct in the sense that there could
hypothetically exist a problem on a system where int is less than 32
bits, in reality this is not the case for Cygwin and so it's just noise.

Brian

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Autogen-users mailing list
Autogen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/autogen-users

Reply via email to