summaryrefslogtreecommitdiffstats
path: root/usr.bin/mk_cmds
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-07-12 19:08:36 +0000
committerjkh <jkh@FreeBSD.org>1996-07-12 19:08:36 +0000
commit730964efd28b80be48ed35a215a362dde2b6b7a7 (patch)
treeb07c215aa55db3fb81db462f4bc70f61cd56c57f /usr.bin/mk_cmds
parentc4d4a99d31762beef936f34571330923e9300da9 (diff)
downloadFreeBSD-src-730964efd28b80be48ed35a215a362dde2b6b7a7.zip
FreeBSD-src-730964efd28b80be48ed35a215a362dde2b6b7a7.tar.gz
General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
Diffstat (limited to 'usr.bin/mk_cmds')
-rw-r--r--usr.bin/mk_cmds/cmd_tbl.l14
-rw-r--r--usr.bin/mk_cmds/mk_cmds.c3
2 files changed, 10 insertions, 7 deletions
diff --git a/usr.bin/mk_cmds/cmd_tbl.l b/usr.bin/mk_cmds/cmd_tbl.l
index 15b31c6..0c615ce 100644
--- a/usr.bin/mk_cmds/cmd_tbl.l
+++ b/usr.bin/mk_cmds/cmd_tbl.l
@@ -11,41 +11,41 @@
extern char *last_token, *ds();
-static l_command_table()
+static int l_command_table()
{
last_token = "command_table";
return COMMAND_TABLE;
}
-static l_request()
+static int l_request()
{
last_token = "request";
return REQUEST;
}
-static l_unimplemented()
+static int l_unimplemented()
{
last_token = "unimplemented";
return UNIMPLEMENTED;
}
-static l_end()
+static int l_end()
{
last_token = "end";
return END;
}
-static l_quoted_string()
+static int l_quoted_string()
{
register char *p;
yylval.dynstr = ds(yytext+1);
- if (p=rindex(yylval.dynstr, '"'))
+ if ( (p=rindex(yylval.dynstr, '"')) )
*p='\0';
last_token = ds(yylval.dynstr);
return STRING;
}
-static l_string()
+static int l_string()
{
yylval.dynstr = ds(yytext);
last_token = ds(yylval.dynstr);
diff --git a/usr.bin/mk_cmds/mk_cmds.c b/usr.bin/mk_cmds/mk_cmds.c
index 8298859..1c3a3fb 100644
--- a/usr.bin/mk_cmds/mk_cmds.c
+++ b/usr.bin/mk_cmds/mk_cmds.c
@@ -26,6 +26,7 @@ extern FILE *output_file;
extern FILE *yyin, *yyout;
extern int yylineno;
+int
main(argc, argv)
int argc;
char **argv;
@@ -85,10 +86,12 @@ main(argc, argv)
return result;
}
+int
yyerror(s)
char *s;
{
fputs(s, stderr);
fprintf(stderr, "\nLine %d; last token was '%s'\n",
yylineno, last_token);
+ return 0;
}
OpenPOWER on IntegriCloud