This is the mail archive of the cygwin@cygwin.com 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]

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


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.

Attachment: smime.p7s
Description: application/pkcs7-signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]