Opened 15 years ago
Closed 14 years ago
#5784 closed bug (fixed)
Improvement of some posix headers for gcc2
Reported by: | obache | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Build System | Version: | R1/alpha1 |
Keywords: | Cc: | planche2k@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Some posix header files need to be fixed for gcc2. Because dummy argument names are conflict with function names. It will be detected with -Wshadow gcc option and with -Wall option, then result in error. It may be a bug of gcc2 because it is just in function declaration statement, so it does really hide nothing. Anyway, attached patch should avoid the issue.
-> cat n.c #include <string.h> #include <sys/statvfs.h> #include <net/if.h> int main(int argc, char** argv) { return 0; } -> gcc -Werror -Wshadow n.c cc1: warnings being treated as errors In file included from /boot/home/n.c:2: /boot/develop/headers/posix/sys/statvfs.h:35: warning: declaration of `statvfs' shadows global declaration In file included from /boot/home/n.c:3: /boot/develop/headers/posix/net/if.h:96: warning: declaration of `index' shadows global declaration
Attachments (1)
Change History (6)
by , 15 years ago
Attachment: | header.patch added |
---|
comment:1 by , 15 years ago
Cc: | added |
---|
comment:2 by , 14 years ago
patch: | 0 → 1 |
---|
comment:3 by , 14 years ago
comment:4 by , 14 years ago
Here's the new one:
cc1: warnings being treated as errors In file included from /boot/develop/headers/posix/net/route.h:9, from /boot/develop/headers/posix/net/if.h:9, from /boot/home/n.c:3: /boot/develop/headers/posix/sys/socket.h:187: warning: declaration of `socket' shadows global declaration
Note:
See TracTickets
for help on using tickets.
Applied in hrev38709. But there's a new one that pops up that should probably also be fixed, let's keep this ticket open until that one is fixed as well.