This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Corinna Vinschen wrote:
- DON'T forget to add casts if such Win32 API types are used with printf(). This: printf("Win32 Error=%lu\n", GetLastError()); worked for all i686 and Windows x86_64, but fails now on Cygwin x86_64.I skipped that because the FAQ entry is not exactly what I wrote in my mail. Do you still think this is necessary?
No - these cases would be reported by compiler if -W[error=]format is enabled.
Yes - the knowledge that there is no portable way to pass DWORD, LONG, ... to printf() without a cast might help to write correct code without test builds on all platforms :-)
Christian -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |