Opened 9 years ago
Last modified 9 years ago
#352 new defect
GCC 4 barfs on _PFN definition in os2emx.h
Reported by: | dmik | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | new |
Component: | emx | Version: | 0.6.6 |
Severity: | normal | Keywords: | |
Cc: |
Description
If you pass the -Wstrict-prototypes
option to GCC 4, an attempt to compile a C source that includes <os2.h>
will give you this:
/@unixroot/usr/include/os2emx.h:323:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
One example is fontconfig: http://trac.netlabs.org/ports/browser/fontconfig/trunk.
Note:
See TracTickets
for help on using tickets.
The definition of _PFN is as follows:
From what I get, the warnings is because a function that doesn't take any arguments is not a valid prototype in C. The warning goes away if we put VOID inside braces but that may cause warnings when assigning function addresses to PFN variables. So we can simply shut up this particular warning for this part of the header: