From eabdfb5e1ebf83147017c57db3659e7b2e8ecad1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 26 Oct 1996 22:21:16 +0000 Subject: gcc -Wall cleanup. svn path=/trunk/; revision=396 --- rcfile_y.y | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'rcfile_y.y') diff --git a/rcfile_y.y b/rcfile_y.y index b4c26ce8..62ca5ef0 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -12,6 +12,14 @@ #include #include #include +#if defined(STDC_HEADERS) +#include +#endif +#if defined(HAVE_UNISTD_H) +#include +#endif +#include + #include "fetchmail.h" struct query cmd_opts; /* where to put command-line info */ @@ -139,9 +147,9 @@ extern FILE *yyin; static struct query *hosttail; /* where to add new elements */ -int yyerror (s) +void yyerror (s) /* report a syntax error */ -char *s; /* error string */ +const char *s; /* error string */ { fprintf(stderr,"%s line %d: %s at %s\n", rcfile, prc_lineno, s, yytext); prc_errflag++; @@ -149,7 +157,7 @@ char *s; /* error string */ int prc_filecheck(pathname) /* check that a configuration file is secure */ -char *pathname; /* pathname for the configuration file */ +const char *pathname; /* pathname for the configuration file */ { struct stat statbuf; @@ -186,9 +194,9 @@ char *pathname; /* pathname for the configuration file */ return(0); } -prc_parse_file (pathname) +int prc_parse_file (pathname) /* digest the configuration into a linked list of host records */ -char *pathname; /* pathname for the configuration file */ +const char *pathname; /* pathname for the configuration file */ { prc_errflag = 0; querylist = hosttail = (struct query *)NULL; @@ -217,7 +225,7 @@ char *pathname; /* pathname for the configuration file */ return(0); } -prc_reset() +void prc_reset() /* clear the global current record (server parameters) used by the parser */ { char savename[HOSTLEN+1]; @@ -262,7 +270,7 @@ struct query *init; /* pointer to block containing initial values */ return(node); } -int prc_register() +void prc_register() /* register current parameters and append to the host list */ { #define STR_FORCE(fld, len) if (cmd_opts.fld[0]) \ @@ -295,8 +303,6 @@ void optmerge(h2, h1) struct query *h1; struct query *h2; { - struct idlist *idp; - append_uid_list(&h2->localnames, &h1->localnames); #define STR_MERGE(fld, len) if (*(h2->fld) == '\0') strcpy(h2->fld, h1->fld) -- cgit v1.2.3