[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#56089: libc6: redundant declarations



Package: libc6
Version: 2.1.2-10
Severity: wishlist

$ cat bad.c
#define _XOPEN_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(void){exit(0);}
$ cc -Wredundant-decls bad.c
In file included from /usr/include/unistd.h:724,
                 from bad.c:4:
/usr/include/getopt.h:36: warning: redundant redeclaration of `optarg' in same scope
/usr/include/getopt.h:36: warning: previous declaration of `optarg'
/usr/include/getopt.h:50: warning: redundant redeclaration of `optind' in same scope
/usr/include/getopt.h:50: warning: previous declaration of `optind'
/usr/include/getopt.h:55: warning: redundant redeclaration of `opterr' in same scope
/usr/include/getopt.h:55: warning: previous declaration of `opterr'
/usr/include/getopt.h:59: warning: redundant redeclaration of `optopt' in same scope
/usr/include/getopt.h:59: warning: previous declaration of `optopt'
/usr/include/getopt.h:134: warning: redundant redeclaration of `getopt' in same
scope
/usr/include/getopt.h:134: warning: previous declaration of `getopt'
In file included from bad.c:4:
/usr/include/unistd.h:956: warning: redundant redeclaration of `setkey' in same
scope
/usr/include/stdlib.h:738: warning: previous declaration of `setkey'
/usr/include/unistd.h:975: warning: redundant redeclaration of `ctermid' in same scope
/usr/include/stdio.h:584: warning: previous declaration of `ctermid'
/usr/include/unistd.h:979: warning: redundant redeclaration of `cuserid' in same scope
/usr/include/stdio.h:590: warning: previous declaration of `cuserid'
/usr/include/unistd.h:982: warning: redundant redeclaration of `rename' in same
scope
/usr/include/stdio.h:122: warning: previous declaration of `rename'
$

_XOPEN_SOURCE is needed by crypt(3).

-- System Information
Debian Release: potato
Kernel Version: Linux wonderland 2.2.13 #1 Sat Dec 4 17:00:59 CET 1999 i586 unknown

Versions of the packages libc6 depends on:
ii  ldso            1.9.11-5       The Linux dynamic linker, library and utilit


Reply to: