Currently, CVS setup.exe does not compile, due to warnings with 'warnings as errors' in effect. How best to change code to avoid warnings?

Max Bowsher maxb@ukf.net
Sat Mar 2 10:35:00 GMT 2002


Currently, CVS setup.exe does not compile, due to warnings with 'warnings as
errors' in effect. How best to change code to avoid warnings?

Warning in winsup/bz2lib/bzlib.c:

static char *bzerrorstrings[] = {
       "OK"
....

This requires the insertion of a const qualifier. I'm mentioning this in
passing - this change is obviously correct. The main point is the next
warning:

Warning in winsup/w32api/include/windef.h:

typedef int (WINAPI *FARPROC)();
typedef int (WINAPI *NEARPROC)();
typedef int (WINAPI *PROC)();

Since -Wstrict-prototypes is in effect, gcc won't accept empty sets of
brackets to declare a function. Adding void between the brackets solves the
problem _here_, but is this a good thing to do, given that it would break
code using C's unchecked parameters feature with these types?

What do the experts think?


Max.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2688 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020302/a4006ed2/attachment.bin>


More information about the Cygwin mailing list