From: Ben Gras Date: Fri, 24 Mar 2006 14:08:51 +0000 (+0000) Subject: Compiler warning fix X-Git-Tag: v3.1.2a~150 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=c1585a6b5e391c99674099e8f4deacd1f7d6a163;p=minix.git Compiler warning fix --- diff --git a/commands/bc/proto.h b/commands/bc/proto.h index a036cb548..8c4124d55 100755 --- a/commands/bc/proto.h +++ b/commands/bc/proto.h @@ -160,6 +160,3 @@ _PROTOTYPE(void process_params, (program_counter *pc, int func )); _PROTOTYPE(int yyparse, (void)); _PROTOTYPE(int yylex, (void)); -/* Other things... */ -_PROTOTYPE(int getopt, (int, char * [], char * )); - diff --git a/commands/simple/calendar.c b/commands/simple/calendar.c index 136ee6231..92b850291 100755 --- a/commands/simple/calendar.c +++ b/commands/simple/calendar.c @@ -37,7 +37,9 @@ _PROTOTYPE(int newaccess, (char *file)); _PROTOTYPE(void grep, (char *file, char *user)); _PROTOTYPE(int date_exp, (void)); _PROTOTYPE(char *date_pat, (time_t t)); +/* _PROTOTYPE(void regerror, (char *s)); +*/ _PROTOTYPE(void error, (char *s, char *t)); int main(argc, argv) @@ -215,9 +217,9 @@ time_t t; } void regerror(s) -char *s; +const char *s; { /* regcomp() needs this */ - error("REGULAR EXPRESSION ERROR (%s)", s); + error("REGULAR EXPRESSION ERROR (%s)", (char *) s); } void error(s, t) diff --git a/commands/simple/cgrep.c b/commands/simple/cgrep.c index d561e060c..d243dc9e3 100755 --- a/commands/simple/cgrep.c +++ b/commands/simple/cgrep.c @@ -75,7 +75,7 @@ _PROTOTYPE(int main, (int argc, char **argv)); _PROTOTYPE(void dosrch, (char *ifnm)); _PROTOTYPE(void shwlin, (char *fnm, int linnum, char *line)); _PROTOTYPE(int matlin, (char *line)); -_PROTOTYPE(void regerror, (char *s)); +_PROTOTYPE(void regerror, (const char *s)); /* External data */ @@ -372,8 +372,8 @@ char *line; /* Line to match */ void regerror(s) -char *s; +const char *s; { - printf("%s\n", s); + printf("%s\n", (char *) s); exit(1); } diff --git a/commands/simple/fgrep.c b/commands/simple/fgrep.c index 7abb613ed..64c04087c 100755 --- a/commands/simple/fgrep.c +++ b/commands/simple/fgrep.c @@ -75,7 +75,6 @@ _PROTOTYPE(void usage, (void)); _PROTOTYPE(char *get_line, (void)); _PROTOTYPE(void string_file, (void)); _PROTOTYPE(void add_string, (char *str)); -_PROTOTYPE(int getopt, (int argc, char **argv, char *optstring)); int main(argc, argv) int argc;