From 24582af9367becf5478e0c3802c94560c15ff220 Mon Sep 17 00:00:00 2001 From: mar Date: Fri, 8 Mar 1991 10:15:52 +0000 Subject: [PATCH] lint --- clients/blanche/blanche.c | 2 +- clients/moira/menu.c | 2 +- clients/moira/utils.c | 2 + gdb/gdb_db.c | 4 ++ gdb/gdb_fserv.c | 123 ++++++++++++++++---------------------- gdb/gdb_lib.h | 8 +++ gdb/gdb_ops.c | 4 ++ gdb/gdb_serv.c | 1 + gdb/gdb_struct.c | 23 +------ gdb/gdb_stype.c | 9 +++ lib/critical.c | 3 +- lib/hash.c | 2 + lib/mr_auth.c | 1 + lib/mr_ops.c | 1 + lib/mr_param.c | 2 + lib/sq.c | 4 +- 16 files changed, 96 insertions(+), 95 deletions(-) diff --git a/clients/blanche/blanche.c b/clients/blanche/blanche.c index 6d582928..aa34f8d3 100644 --- a/clients/blanche/blanche.c +++ b/clients/blanche/blanche.c @@ -388,7 +388,7 @@ char **argv; show_list_member(memberstruct) struct member *memberstruct; { - char *s; + char *s = ""; switch (memberstruct->type) { case M_USER: diff --git a/clients/moira/menu.c b/clients/moira/menu.c index b44d4241..2b889225 100644 --- a/clients/moira/menu.c +++ b/clients/moira/menu.c @@ -115,7 +115,7 @@ Start_menu(m) register void (*old_hook)() = set_com_err_hook(menu_com_err_hook); #endif - if (initscr() == ERR) { + if (initscr() == (WINDOW *)ERR) { fputs("Can't initialize curses!\n", stderr); Start_no_menu(m); } else { diff --git a/clients/moira/utils.c b/clients/moira/utils.c index b556faca..f3999345 100644 --- a/clients/moira/utils.c +++ b/clients/moira/utils.c @@ -275,6 +275,8 @@ Scream() "\nA Moira update returned a value -- programmer botch\n"); mr_disconnect(); exit(1); + /*NOTREACHED*/ + return(-1); } /* Function Name: PromptWithDefault diff --git a/gdb/gdb_db.c b/gdb/gdb_db.c index 4130c656..0b03fc84 100644 --- a/gdb/gdb_db.c +++ b/gdb/gdb_db.c @@ -238,6 +238,7 @@ DATABASE *db_handle; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_iadb(op, hcon, arg) OPERATION op; @@ -568,6 +569,7 @@ char *request; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_ipdb(op, hcon, arg) OPERATION op; @@ -888,6 +890,7 @@ char *query; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_idbq(op, hcon, arg) OPERATION op; @@ -971,6 +974,7 @@ struct dbq_data *arg; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_cdbq(op, hcon, arg) OPERATION op; diff --git a/gdb/gdb_fserv.c b/gdb/gdb_fserv.c index 33986ecc..4000b35e 100644 --- a/gdb/gdb_fserv.c +++ b/gdb/gdb_fserv.c @@ -1,5 +1,4 @@ /* - * $Source$ * $Header$ */ @@ -9,36 +8,18 @@ static char *rcsid_gdb_fserv_c = "$Header$"; - - - - - - - - - - - - - - - - - - -/************************************************************************/ -/* -/* gdb_fserv.c -/* -/* GDB - Routines to implement forking servers. -/* -/* Author: Noah Mendelsohn -/* Copyright: 1986 MIT Project Athena -/* For copying and distribution information, please see -/* the file . -/* -/************************************************************************/ +/************************************************************************ + * + * gdb_fserv.c + * + * GDB - Routines to implement forking servers. + * + * Author: Noah Mendelsohn + * Copyright: 1986 MIT Project Athena + * For copying and distribution information, please see + * the file . + * + ************************************************************************/ #include #include @@ -50,45 +31,45 @@ static char *rcsid_gdb_fserv_c = "$Header$"; #include "gdb.h" #include -/************************************************************************/ -/* -/* create_forking_server (create_forking_server) -/* -/* Called by an application to turn itself into a forking model -/* server. Returns from this routine occur only in the forked -/* children. The parent lives in this routine forever, waiting -/* for incoming connection requests and doing the appropriate -/* forking. -/* -/* Children are expected to do their own cleanup, but this routine -/* does do the work of reaping the resulting zombie processes. -/* -/* ARGUMENTS: -/* ---------- -/* -/* service-id identifies the port to be used for -/* listening. Same rules as for -/* create_listening_connection. -/* -/* validate-rtn pointer to a function to be called to -/* validate the incoming client. Should -/* return TRUE if client is acceptable, -/* else false. If this is NULL, all clients -/* are accepted. -/* -/* GLOBAL VARIABLES -/* ---------------- -/* -/* Children created by this routine inherit the global variables -/* gdb_sockaddr_of_client, which is of type sockaddr_in and -/* gdb_socklen, which is the returned length of the sockaddr. -/* These are the Berkeley identifiers of the clients as accepted. -/* Use of this interface is non-portable to other than Berkeley -/* systems. -/* -/* The client's request tuple may be found in gdb_client_tuple. -/* -/************************************************************************/ +/************************************************************************ + * + * create_forking_server (create_forking_server) + * + * Called by an application to turn itself into a forking model + * server. Returns from this routine occur only in the forked + * children. The parent lives in this routine forever, waiting + * for incoming connection requests and doing the appropriate + * forking. + * + * Children are expected to do their own cleanup, but this routine + * does do the work of reaping the resulting zombie processes. + * + * ARGUMENTS: + * ---------- + * + * service-id identifies the port to be used for + * listening. Same rules as for + * create_listening_connection. + * + * validate-rtn pointer to a function to be called to + * validate the incoming client. Should + * return TRUE if client is acceptable, + * else false. If this is NULL, all clients + * are accepted. + * + * GLOBAL VARIABLES + * ---------------- + * + * Children created by this routine inherit the global variables + * gdb_sockaddr_of_client, which is of type sockaddr_in and + * gdb_socklen, which is the returned length of the sockaddr. + * These are the Berkeley identifiers of the clients as accepted. + * Use of this interface is non-portable to other than Berkeley + * systems. + * + * The client's request tuple may be found in gdb_client_tuple. + * + ************************************************************************/ CONNECTION @@ -96,7 +77,7 @@ create_forking_server(service, validate) char *service; int (*validate)(); { - + void start_accepting_client(); CONNECTION incoming; /* listen for incoming */ /* children here */ CONNECTION client = NULL; /* connection to client */ diff --git a/gdb/gdb_lib.h b/gdb/gdb_lib.h index 2ffd651c..c67b6eb3 100644 --- a/gdb/gdb_lib.h +++ b/gdb/gdb_lib.h @@ -132,6 +132,14 @@ struct con_data gdb_cons[GDB_MAX_CONNECTIONS]; /* actual connection data */ fd_set gdb_crfds, gdb_cwfds, gdb_cefds; /* connection related file */ /* descriptor maps to be */ /* used in select */ +fd_set last_crfds, last_cwfds, last_cefds; /* these file desc. bit */ + /* masks are set up */ + /* for each select call */ + /* to include the user */ + /* supplied and the */ + /* connection related */ + /* fd's */ + /*----------------------------------------------------------*/ /* /* gdb_notime diff --git a/gdb/gdb_ops.c b/gdb/gdb_ops.c index 1b6b7af1..449feec6 100644 --- a/gdb/gdb_ops.c +++ b/gdb/gdb_ops.c @@ -222,6 +222,7 @@ struct obj_data *arg; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_csnobj(op, hcon, arg) OPERATION op; @@ -657,6 +658,7 @@ struct lis_data *arg; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_clis(op, hcon, arg) OPERATION op; @@ -774,6 +776,7 @@ TUPLE *tuplep; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_iacc(op, hcon, arg) OPERATION op; @@ -878,6 +881,7 @@ struct acc_data *arg; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_i2acc(op, hcon, arg) OPERATION op; diff --git a/gdb/gdb_serv.c b/gdb/gdb_serv.c index 0514d7ac..4d2721ad 100644 --- a/gdb/gdb_serv.c +++ b/gdb/gdb_serv.c @@ -462,6 +462,7 @@ char *parms; /* " " */ /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_irtc(op, hcon, arg) OPERATION op; diff --git a/gdb/gdb_struct.c b/gdb/gdb_struct.c index 8697966e..345b1bff 100644 --- a/gdb/gdb_struct.c +++ b/gdb/gdb_struct.c @@ -1,5 +1,4 @@ /* - * $Source$ * $Header$ */ @@ -7,25 +6,6 @@ static char *rcsid_gdb_struct_c = "$Header$"; #endif lint - - - - - - - - - - - - - - - - - - - /************************************************************************/ /* @@ -61,7 +41,9 @@ static char *rcsid_gdb_struct_c = "$Header$"; #include "gdb.h" extern char *malloc(); +#ifndef lint extern void free(); +#endif /************************************************************************/ /* @@ -102,6 +84,7 @@ int bytes; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int gdb_fm(ptr, bytes) char *ptr; diff --git a/gdb/gdb_stype.c b/gdb/gdb_stype.c index fd4f0e85..ba7da0fc 100644 --- a/gdb/gdb_stype.c +++ b/gdb/gdb_stype.c @@ -113,6 +113,7 @@ char *dp; /* pointer to the data */ /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_in_cdlen(dp,hcon) char *dp; /* pointer to the data */ @@ -129,6 +130,7 @@ HALF_CONNECTION hcon; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_in_enc(dp, hcon, outp) char *dp; /* pointer to data */ @@ -169,6 +171,7 @@ char *outp; /* place to put the output */ /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_in_dec(outp, hcon, inp) char *inp; /* pointer to data */ @@ -444,6 +447,7 @@ char *dp; /* pointer to the data */ /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_rl_cdlen(dp,hcon) char *dp; /* pointer to the data */ @@ -460,6 +464,7 @@ HALF_CONNECTION hcon; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_rl_enc(dp, hcon, outp) char *dp; /* pointer to data */ @@ -500,6 +505,7 @@ char *outp; /* place to put the output */ /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_rl_dec(outp, hcon, inp) char *inp; /* pointer to data */ @@ -577,6 +583,7 @@ char *dp; /* pointer to the data */ /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_dt_cdlen(dp,hcon) char *dp; /* pointer to the data */ @@ -593,6 +600,7 @@ HALF_CONNECTION hcon; /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_dt_enc(dp, hcon, outp) char *dp; /* pointer to data */ @@ -622,6 +630,7 @@ char *outp; /* place to put the output */ /* /*----------------------------------------------------------*/ +/*ARGSUSED*/ int g_dt_dec(outp, hcon, inp) char *inp; /* pointer to data */ diff --git a/lib/critical.c b/lib/critical.c index 3afcce54..c0af33bf 100644 --- a/lib/critical.c +++ b/lib/critical.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #ifdef ZEPHYR @@ -51,7 +52,7 @@ void critical_alert(instance, msg, arg1, arg2, arg3, arg4, /* Log message to critical file */ if ((crit = fopen(CRITERRLOG, "a")) != (FILE *)NULL) { - long t; + long t, time(); char *time_s; time(&t); diff --git a/lib/hash.c b/lib/hash.c index 2a41cd2e..d09615c1 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -11,6 +11,8 @@ #include #include +extern char *malloc(); + #define NULL 0 #define hash_func(h, key) (key >= 0 ? (key % h->size) : (-key % h->size)) diff --git a/lib/mr_auth.c b/lib/mr_auth.c index 53b6349e..ca0eb453 100644 --- a/lib/mr_auth.c +++ b/lib/mr_auth.c @@ -20,6 +20,7 @@ static char *rcsid_sms_auth_c = "$Header$"; #include #include #include +#include /* Authenticate this client with the MR server. prog is the name of the * client program, and will be recorded in the database. diff --git a/lib/mr_ops.c b/lib/mr_ops.c index 3ee171bb..8c3b5912 100644 --- a/lib/mr_ops.c +++ b/lib/mr_ops.c @@ -18,6 +18,7 @@ static char *rcsid_sms_do_update_c = "$Header$"; #endif lint #include +#include #include "mr_private.h" diff --git a/lib/mr_param.c b/lib/mr_param.c index 8f5923b3..661b7862 100644 --- a/lib/mr_param.c +++ b/lib/mr_param.c @@ -28,6 +28,7 @@ static char *rcsid_sms_param_c = "$Header$"; * write of the next bunch of data. */ +/*ARGSUSED*/ mr_cont_send(op, hcon, arg) OPERATION op; HALF_CONNECTION hcon; @@ -129,6 +130,7 @@ mr_start_send(op, hcon, arg) else return OP_RUNNING; } +/*ARGSUSED*/ mr_cont_recv(op, hcon, argp) OPERATION op; HALF_CONNECTION hcon; diff --git a/lib/sq.c b/lib/sq.c index 72fcfbac..eabefd61 100644 --- a/lib/sq.c +++ b/lib/sq.c @@ -10,6 +10,8 @@ #include #include +extern char *malloc(); + struct save_queue * sq_create() { @@ -52,7 +54,7 @@ sq_save_args(argc, argv, sq) bcopy(argv[i], argv_copy[i], n); } - sq_save_data(sq, argv_copy); + sq_save_data(sq, (char *)argv_copy); } sq_save_unique_data(sq, data) -- 2.45.2