util-linux-2.8 na develu ;(
Wojtek Slusarczyk
wojtek w SHADOW.EU.ORG
Śro, 30 Wrz 1998, 12:03:12 CEST
Hej,
Wracjac do sprawy util-linux-2.8, nie dalo rdy ich tez przebudowac
pod egcsem19980921, oto wykaz bledow -> niech sie madrzy ludzie od C
wypowedza w tej kwestii:
/usr/include/bits/string2.h: In function `__strpbrk_c2':
In file included from /usr/include/string.h:329,
from getopt.c:35:
/usr/include/bits/string2.h:676: warning: cast discards `const' from pointer target type
/usr/include/bits/string2.h: In function `__strpbrk_c3':
/usr/include/bits/string2.h:689: warning: cast discards `const' from pointer target type
getopt.c: At top level:
getopt.c:66: warning: function declaration isn't a prototype
getopt.c:171: warning: no previous prototype for `generate_output'
getopt.c: In function `generate_output':
getopt.c:183: warning: implicit declaration of function `getopt_long_only'
getopt.c:184: warning: implicit declaration of function `getopt_long'
getopt.c:191: arithmetic on pointer to an incomplete type
^^^^^^^^^^ ???
A w lini 191,192 stoi:
if (opt == LONG_OPT) {
printf(" --%s",longopts[longindex].name);
if (longopts[longindex].has_arg)
getopt.c:252: arithmetic on pointer to an incomplete typ
------cut------
getopt.c:263: arithmetic on pointer to an incomplete type
getopt.c:263: arithmetic on pointer to an incomplete type
getopt.c:263: dereferencing pointer to incomplete type
A w tych liniach jest:
long_options[long_options_nr].name=NULL;
long_options[long_options_nr].has_arg=0;
long_options[long_options_nr].flag=NULL;
long_options[long_options_nr].val=0;
getopt.c: In function `add_long_options':
getopt.c:279: `no_argument' undeclared (first use in this function)
getopt.c:279: (Each undeclared identifier is reported only once
^^^^^^^^^^^^^^^^^^^ :
int arg_opt;
char *tokptr=strtok(options,", \t\n");
getopt.c:340: elements of array `longopts' have incomplete type
getopt.c:340: warning: excess elements in struct initializer after `longopts[0]'
.......
getopt.c:351: warning: excess elements in struct initializer after `longopts[11]'
getopt.c:352: invalid use of undefined type `struct option'
a tam jest :
static struct option longopts[]={ {"options",required_argument,NULL,'o'},
{"longoptions",required_argument,NULL,'l'},
{"quiet",no_argument,NULL,'q'},
{"quiet-output",no_argument,NULL,'Q'},
{"shell",required_argument,NULL,'s'},
{"test",no_argument,NULL,'T'},
{"unquoted",no_argument,NULL,'u'},
{"help",no_argument,NULL,'h'},
{"alternative",no_argument,NULL,'a'},
{"name",required_argument,NULL,'n'},
{"version",no_argument,NULL,'V'},
{NULL,0,NULL,0}
};
getopt.c: In function `main':
getopt.c:386: too many arguments to function `generate_output'
A tam stoi z kolei:
argv[1]=argv[0];
exit(generate_output(argv+1,argc-1,optstr,long_options));
make: *** [getopt.o] Error 1
Wojciech Slusarczyk (091)4494148
Technical University of Szczecin
PGP KeyServer pgpkeys.mit.edu
Więcej informacji o liście dyskusyjnej pld-devel-pl