diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | support/misc/from_local.c | 7 | ||||
-rw-r--r-- | support/misc/tcpwrapper.c | 25 | ||||
-rw-r--r-- | support/nfs/fstab.c | 4 | ||||
-rw-r--r-- | support/nfs/rpcmisc.c | 4 | ||||
-rw-r--r-- | support/nfs/wildmat.c | 8 | ||||
-rw-r--r-- | utils/mount/mount.c | 2 | ||||
-rw-r--r-- | utils/mount/nfsmount.c | 2 | ||||
-rw-r--r-- | utils/mount/nfsumount.c | 2 | ||||
-rw-r--r-- | utils/mount/nfsumount.h | 2 | ||||
-rw-r--r-- | utils/showmount/showmount.c | 14 | ||||
-rw-r--r-- | utils/statd/log.c | 2 | ||||
-rw-r--r-- | utils/statd/log.h | 2 | ||||
-rw-r--r-- | utils/statd/monitor.c | 2 | ||||
-rw-r--r-- | utils/statd/sm-notify.c | 4 | ||||
-rw-r--r-- | utils/statd/statd.c | 4 | ||||
-rw-r--r-- | utils/statd/statd.h | 1 |
17 files changed, 36 insertions, 51 deletions
diff --git a/configure.ac b/configure.ac index 337becc..16d0da6 100644 --- a/configure.ac +++ b/configure.ac @@ -333,7 +333,7 @@ case $host in ARCHFLAGS="" ;; esac -my_am_cflags="-Wall $ARCHFLAGS -pipe" +my_am_cflags="-Wall -Wstrict-prototypes $ARCHFLAGS -pipe" AC_SUBST([AM_CPPFLAGS], ["-I\${top_srcdir}/support/include"]) AC_SUBST([AM_CFLAGS], ["$my_am_cflags"]) diff --git a/support/misc/from_local.c b/support/misc/from_local.c index f6f944c..d987207 100644 --- a/support/misc/from_local.c +++ b/support/misc/from_local.c @@ -71,7 +71,7 @@ static struct in_addr *addrs; /* grow_addrs - extend list of local interface addresses */ -static int grow_addrs() +static int grow_addrs(void) { struct in_addr *new_addrs; int new_num; @@ -99,7 +99,7 @@ static int grow_addrs() /* find_local - find all IP addresses for this host */ static int -find_local() +find_local(void) { struct ifconf ifc; struct ifreq ifreq; @@ -157,8 +157,7 @@ find_local() /* from_local - determine whether request comes from the local system */ int -from_local(addr) -struct sockaddr_in *addr; +from_local(struct sockaddr_in *addr) { int i; diff --git a/support/misc/tcpwrapper.c b/support/misc/tcpwrapper.c index ebe63e1..0cc9335 100644 --- a/support/misc/tcpwrapper.c +++ b/support/misc/tcpwrapper.c @@ -49,8 +49,9 @@ #include <rpc/rpcent.h> #endif -static void logit(); -static void toggle_verboselog(); +static void logit(int severity, struct sockaddr_in *addr, + u_long procnum, u_long prognum, char *text); +static void toggle_verboselog(int sig); int verboselog = 0; int allow_severity = LOG_INFO; int deny_severity = LOG_WARNING; @@ -139,7 +140,7 @@ struct sockaddr_in *addr; /* check_startup - additional startup code */ -void check_startup() +void check_startup(void) { /* @@ -194,11 +195,8 @@ u_long prog; /* check_privileged_port - additional checks for privileged-port updates */ int -check_privileged_port(addr, proc, prog, port) -struct sockaddr_in *addr; -u_long proc; -u_long prog; -u_long port; +check_privileged_port(struct sockaddr_in *addr, + u_long proc, u_long prog, u_long port) { #ifdef CHECK_PORT if (!legal_port(addr, port)) { @@ -211,8 +209,7 @@ u_long port; /* toggle_verboselog - toggle verbose logging flag */ -static void toggle_verboselog(sig) -int sig; +static void toggle_verboselog(int sig) { (void) signal(sig, toggle_verboselog); verboselog = !verboselog; @@ -220,12 +217,8 @@ int sig; /* logit - report events of interest via the syslog daemon */ -static void logit(severity, addr, procnum, prognum, text) -int severity; -struct sockaddr_in *addr; -u_long procnum; -u_long prognum; -char *text; +static void logit(int severity, struct sockaddr_in *addr, + u_long procnum, u_long prognum, char *text) { char *procname; char procbuf[16 + 4 * sizeof(u_long)]; diff --git a/support/nfs/fstab.c b/support/nfs/fstab.c index aee8e53..b4f8710 100644 --- a/support/nfs/fstab.c +++ b/support/nfs/fstab.c @@ -87,14 +87,14 @@ static void read_mounttable(void); static void read_fstab(void); static struct mntentchn * -mtab_head() { +mtab_head(void) { if (!got_mtab) read_mounttable(); return &mounttable; } static struct mntentchn * -fstab_head() +fstab_head(void) { if (!got_fstab) read_fstab(); diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c index 22ea62c..fcc6433 100644 --- a/support/nfs/rpcmisc.c +++ b/support/nfs/rpcmisc.c @@ -47,7 +47,9 @@ int _rpcfdtype = 0; int _rpcsvcdirty = 0; void -rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport) +rpc_init(char *name, int prog, int vers, + void (*dispatch)(struct svc_req *, register SVCXPRT *), + int defport) { struct sockaddr_in saddr; SVCXPRT *transp; diff --git a/support/nfs/wildmat.c b/support/nfs/wildmat.c index ba53b3a..c5b4c78 100644 --- a/support/nfs/wildmat.c +++ b/support/nfs/wildmat.c @@ -59,9 +59,7 @@ ** Match text and p, return TRUE, FALSE, or ABORT. */ static int -DoMatch(text, p) - register char *text; - register char *p; +DoMatch(char *text, char *p) { register int last; register int matched; @@ -126,9 +124,7 @@ DoMatch(text, p) ** User-level routine. Returns TRUE or FALSE. */ int -wildmat(text, p) - char *text; - char *p; +wildmat(char *text, char *p) { #ifdef OPTIMIZE_JUST_STAR if (p[0] == '*' && p[1] == '\0') diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 7a4912e..92ed2bc 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -267,7 +267,7 @@ fail_unlock: return result; } -void mount_usage() +void mount_usage(void) { printf("usage: %s remotetarget dir [-rvVwfnh] [-o nfsoptions]\n", progname); diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c index 6949b50..b2b1992 100644 --- a/utils/mount/nfsmount.c +++ b/utils/mount/nfsmount.c @@ -93,7 +93,7 @@ extern char *progname; extern int verbose; extern int sloppy; -extern int linux_version_code(); +extern int linux_version_code(void); static inline enum clnt_stat nfs3_mount(CLIENT *clnt, mnt3arg_t *mnt3arg, mnt3res_t *mnt3res) diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index 303b485..aa68dee 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -236,7 +236,7 @@ static struct option umount_longopts[] = { NULL, 0, 0, 0 } }; -void umount_usage() +void umount_usage(void) { printf("usage: %s dir [-fvnrlh]\n", progname); printf("options:\n\t-f\t\tforce unmount\n"); diff --git a/utils/mount/nfsumount.h b/utils/mount/nfsumount.h index e37eaff..7548912 100644 --- a/utils/mount/nfsumount.h +++ b/utils/mount/nfsumount.h @@ -6,6 +6,6 @@ int nfsumount(int, char **); int nfs_call_umount(clnt_addr_t *, dirpath *); -void umount_usage(); +void umount_usage(void); #endif diff --git a/utils/showmount/showmount.c b/utils/showmount/showmount.c index f3ac671..4e10a29 100644 --- a/utils/showmount/showmount.c +++ b/utils/showmount/showmount.c @@ -62,16 +62,14 @@ static struct option longopts[] = #define MAXHOSTLEN 256 -int dump_cmp(p, q) -char **p; -char **q; +static int dump_cmp(const void *pv, const void *qv) { + const char **p = (const char **)pv; + const char **q = (const char **)qv; return strcmp(*p, *q); } -static void usage(fp, n) -FILE *fp; -int n; +static void usage(FILE *fp, int n) { fprintf(fp, "Usage: %s [-adehv]\n", program_name); fprintf(fp, " [--all] [--directories] [--exports]\n"); @@ -249,9 +247,7 @@ static unsigned short getport(struct sockaddr_in *addr, return htons(port); } -int main(argc, argv) -int argc; -char **argv; +int main(int argc, char **argv) { char hostname_buf[MAXHOSTLEN]; char *hostname; diff --git a/utils/statd/log.c b/utils/statd/log.c index bf2a926..a6ca996 100644 --- a/utils/statd/log.c +++ b/utils/statd/log.c @@ -33,7 +33,7 @@ static pid_t mypid; static int opt_debug = 0; /* Will be command-line option, eventually */ #endif -void log_init() +void log_init(void) { if (!(run_mode & MODE_LOG_STDERR)) openlog(name_p, LOG_PID | LOG_NDELAY, LOG_DAEMON); diff --git a/utils/statd/log.h b/utils/statd/log.h index 49f801a..fc55d3c 100644 --- a/utils/statd/log.h +++ b/utils/statd/log.h @@ -16,7 +16,7 @@ #include <syslog.h> -void log_init(); +void log_init(void); void log_background(void); void log_enable(int facility); int log_enabled(int facility); diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index e40ff7d..eadc434 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -280,7 +280,7 @@ void load_state(void) b = strchr(buf, '\n'); if (b) *b = 0; sscanf(buf, "%x %x %x %x ", - &addr, &prog, &vers, &proc, myname); + &addr, &prog, &vers, &proc); b = buf+36; for (i=0; i<SM_PRIV_SIZE; i++) { sscanf(b, "%2x", &p); diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c index 98c03f9..bb67c37 100644 --- a/utils/statd/sm-notify.c +++ b/utils/statd/sm-notify.c @@ -86,7 +86,7 @@ static int addr_get_port(nsm_address *); static void addr_set_port(nsm_address *, int); static struct addrinfo *host_lookup(int, const char *); void nsm_log(int fac, const char *fmt, ...); -static int record_pid(); +static int record_pid(void); static void drop_privs(void); static void set_kernel_nsm_state(int state); @@ -730,7 +730,7 @@ nsm_log(int fac, const char *fmt, ...) * program exits. * If file already exists, fail. */ -static int record_pid() +static int record_pid(void) { char pid[20]; int fd; diff --git a/utils/statd/statd.c b/utils/statd/statd.c index 8337b64..ea985e6 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -148,7 +148,7 @@ static void log_modes(void) * help the occasional admin. */ static void -usage() +usage(void) { fprintf(stderr,"usage: %s [options]\n", name_p); fprintf(stderr," -h, -?, --help Print this help screen.\n"); @@ -445,7 +445,7 @@ int main (int argc, char **argv) /* Child. */ - log_init (name_p,version_p); + log_init (/*name_p,version_p*/); log_modes(); diff --git a/utils/statd/statd.h b/utils/statd/statd.h index b7ea40b..5d06d88 100644 --- a/utils/statd/statd.h +++ b/utils/statd/statd.h @@ -45,7 +45,6 @@ extern char * SM_STAT_PATH; * Function prototypes. */ extern void change_state(void); -extern void do_regist(u_long, void (*)()); extern void my_svc_run(void); extern void notify_hosts(void); extern void shuffle_dirs(void); |