From e4410010cf6cb191656b4455b12ffb544f3a6768 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 30 Mar 1998 17:10:34 +0000 Subject: [PATCH] gcc -Wall cleanups. Mainly adding prototypes and making sure that functions have return types declared. * ss_internal.h: Add ss_pager_create prototype. * ss.h: Add ss_list_requests prototype. * request_tbl.c (ss_add_request_table, ss_delete_request_table): Declare function types as void. * prompt.c (ss_set_prompt): Declare function as void. * listen.c (ss_quit): Int function should return a value. * list_rqs.c (ss_list_requests): Fix arguments to match proper prototype for a ss type handler. * execute_cmd.c (ss_execute_command): Declare as returning int git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10504 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/ss/ChangeLog | 18 ++++++++++++++++++ src/util/ss/Makefile.in | 3 ++- src/util/ss/execute_cmd.c | 1 + src/util/ss/list_rqs.c | 9 +++++++-- src/util/ss/listen.c | 1 + src/util/ss/prompt.c | 1 + src/util/ss/request_tbl.c | 2 ++ src/util/ss/requests.c | 2 +- src/util/ss/ss.h | 1 + src/util/ss/ss_internal.h | 1 + 10 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/util/ss/ChangeLog b/src/util/ss/ChangeLog index 828c118e5..3e0cf7b4e 100644 --- a/src/util/ss/ChangeLog +++ b/src/util/ss/ChangeLog @@ -1,3 +1,21 @@ +Mon Mar 30 11:30:00 1998 Ezra Peisach + + * ss_internal.h: Add ss_pager_create prototype. + + * ss.h: Add ss_list_requests prototype. + + * request_tbl.c (ss_add_request_table, ss_delete_request_table): + Declare function types as void. + + * prompt.c (ss_set_prompt): Declare function as void. + + * listen.c (ss_quit): Int function should return a value. + + * list_rqs.c (ss_list_requests): Fix arguments to match proper + prototype for a ss type handler. + + * execute_cmd.c (ss_execute_command): Declare as returning int + Wed Feb 18 16:35:55 1998 Tom Yu * Makefile.in: Remove trailing slash from thisconfigdir. Fix up diff --git a/src/util/ss/Makefile.in b/src/util/ss/Makefile.in index 67d6759e2..7ff2ef17b 100644 --- a/src/util/ss/Makefile.in +++ b/src/util/ss/Makefile.in @@ -93,8 +93,9 @@ HDRS = $(HDRDIR)/ss.h \ BUILD_HDRS = ss_err.h SRC_HDRS = ss.h +SRC_HDRS_DEP = $(srcdir)/ss.h -includes:: $(SRC_HDRS) $(BUILD_HDRS) +includes:: $(SRC_HDRS_DEP) $(BUILD_HDRS) mkdir -p $(HDRDIR) for i in $(SRC_HDRS) ; do \ if cmp $(srcdir)/$$i $(HDRDIR)/$$i >/dev/null 2>&1; then :; \ diff --git a/src/util/ss/execute_cmd.c b/src/util/ss/execute_cmd.c index 52f07e239..5fb0cad96 100644 --- a/src/util/ss/execute_cmd.c +++ b/src/util/ss/execute_cmd.c @@ -149,6 +149,7 @@ static int really_execute_command (sci_idx, argc, argv) * Notes: */ +int ss_execute_command(sci_idx, argv) int sci_idx; register char *argv[]; diff --git a/src/util/ss/list_rqs.c b/src/util/ss/list_rqs.c index 460da3a5b..cf2c9312f 100644 --- a/src/util/ss/list_rqs.c +++ b/src/util/ss/list_rqs.c @@ -19,11 +19,16 @@ static char const twentyfive_spaces[26] = " "; static char const NL[2] = "\n"; +void ss_list_requests(argc, argv, sci_idx, info_ptr) int argc; - char **argv; + const char * const *argv; int sci_idx; - pointer info_ptr; +#ifdef __STDC__ + void *info_ptr; +#else + char *info_ptr; +#endif { register ss_request_entry *entry; register char const * const *name; diff --git a/src/util/ss/listen.c b/src/util/ss/listen.c index fc27a7b70..c197a3f80 100644 --- a/src/util/ss/listen.c +++ b/src/util/ss/listen.c @@ -172,4 +172,5 @@ int ss_quit(argc, argv, sci_idx, infop) pointer infop; { ss_abort_subsystem(sci_idx, 0); + return 0; } diff --git a/src/util/ss/prompt.c b/src/util/ss/prompt.c index 5df2731e0..0751baeba 100644 --- a/src/util/ss/prompt.c +++ b/src/util/ss/prompt.c @@ -12,6 +12,7 @@ #include #include "ss_internal.h" +void ss_set_prompt(sci_idx, new_prompt) int sci_idx; char *new_prompt; diff --git a/src/util/ss/request_tbl.c b/src/util/ss/request_tbl.c index 8dcb5837a..6404b5d6b 100644 --- a/src/util/ss/request_tbl.c +++ b/src/util/ss/request_tbl.c @@ -9,6 +9,7 @@ #define ssrt ss_request_table /* for some readable code... */ +void ss_add_request_table(sci_idx, rqtbl_ptr, position, code_ptr) int sci_idx; ssrt *rqtbl_ptr; @@ -41,6 +42,7 @@ ss_add_request_table(sci_idx, rqtbl_ptr, position, code_ptr) *code_ptr = 0; } +void ss_delete_request_table(sci_idx, rqtbl_ptr, code_ptr) int sci_idx; ssrt *rqtbl_ptr; diff --git a/src/util/ss/requests.c b/src/util/ss/requests.c index 5b10356ce..6f0055f57 100644 --- a/src/util/ss/requests.c +++ b/src/util/ss/requests.c @@ -9,7 +9,7 @@ #include #include "ss_internal.h" -#define DECLARE(name) name(argc,argv,sci_idx)int argc,sci_idx;char **argv; +#define DECLARE(name) void name(argc,argv,sci_idx)int argc,sci_idx;char **argv; /* * ss_self_identify -- assigned by default to the "." request diff --git a/src/util/ss/ss.h b/src/util/ss/ss.h index 5f3df3f3a..b3a0aba0f 100644 --- a/src/util/ss/ss.h +++ b/src/util/ss/ss.h @@ -46,6 +46,7 @@ typedef struct _ss_rp_options { /* DEFAULT VALUES */ #define SS_OPT_DONT_SUMMARIZE 0x0002 void ss_help __SS_PROTO; +void ss_list_requests __SS_PROTO; char *ss_current_request(); char *ss_name(); #ifdef __STDC__ diff --git a/src/util/ss/ss_internal.h b/src/util/ss/ss_internal.h index 54046df28..81185172b 100644 --- a/src/util/ss/ss_internal.h +++ b/src/util/ss/ss_internal.h @@ -105,6 +105,7 @@ int ss_execute_line(); char **ss_parse(); ss_abbrev_info *ss_abbrev_initialize PROTOTYPE((char *, int *)); void ss_page_stdin(); +int ss_pager_create(); extern ss_data **_ss_table; extern char *ss_et_msgs[]; -- 2.26.2