summaryrefslogtreecommitdiffstats
path: root/utils/statd
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-07-29 17:20:10 +1000
committerNeil Brown <neilb@suse.de>2007-07-29 17:20:10 +1000
commit5835b1eec5a1f1e463c0762c510c6643fa2bff62 (patch)
tree7a8b95c1b9b1273be2272a2dd9302265f9839e4d /utils/statd
parentdd087896285da9e160e13ee9f7d75381b67895e3 (diff)
downloadnfs-utils-5835b1eec5a1f1e463c0762c510c6643fa2bff62.tar.gz
nfs-utils-5835b1eec5a1f1e463c0762c510c6643fa2bff62.tar.xz
nfs-utils-5835b1eec5a1f1e463c0762c510c6643fa2bff62.zip
Add -Wstrict-prototypes to compiler args, and fix warnings caused.
Diffstat (limited to 'utils/statd')
-rw-r--r--utils/statd/log.c2
-rw-r--r--utils/statd/log.h2
-rw-r--r--utils/statd/monitor.c2
-rw-r--r--utils/statd/sm-notify.c4
-rw-r--r--utils/statd/statd.c4
-rw-r--r--utils/statd/statd.h1
6 files changed, 7 insertions, 8 deletions
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);