diff options
author | Greg Banks <gnb@melbourne.sgi.com> | 2006-06-22 18:01:10 +1000 |
---|---|---|
committer | Greg Banks <gnb@melbourne.sgi.com> | 2006-06-22 18:01:10 +1000 |
commit | 93608a52655abf5ac23404c4b5cc05fe575a9c04 (patch) | |
tree | 5d4debc42ac6667427c5f9f8f6e62a5e74906465 /utils/statd | |
parent | a07343ee0da4f0974a23b673ae1b0d482c7426a1 (diff) | |
download | nfs-utils-93608a52655abf5ac23404c4b5cc05fe575a9c04.tar.gz nfs-utils-93608a52655abf5ac23404c4b5cc05fe575a9c04.tar.xz nfs-utils-93608a52655abf5ac23404c4b5cc05fe575a9c04.zip |
Fix a number of the easier compile warnings: unused variables,
unused labels, constness, signedness.
Diffstat (limited to 'utils/statd')
-rw-r--r-- | utils/statd/monitor.c | 4 | ||||
-rw-r--r-- | utils/statd/statd.c | 4 | ||||
-rw-r--r-- | utils/statd/statd.h | 2 | ||||
-rw-r--r-- | utils/statd/state.c | 1 |
4 files changed, 7 insertions, 4 deletions
diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index 8348473..98cbf4a 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -268,7 +268,9 @@ sm_unmon_1_svc(struct mon_id *argp, struct svc_req *rqstp) clnt = NL_NEXT(clnt); } +#ifdef RESTRICTED_STATD failure: +#endif note(N_WARNING, "Received erroneous SM_UNMON request from %s for %s", my_name, mon_name); return (&result); @@ -336,6 +338,8 @@ sm_unmon_all_1_svc(struct my_id *argp, struct svc_req *rqstp) dprintf(N_DEBUG, "SM_UNMON_ALL request from %s with no " "SM_MON requests from it.", my_name); } +#ifdef RESTRICTED_STATD failure: +#endif return (&result); } diff --git a/utils/statd/statd.c b/utils/statd/statd.c index 8ebb808..c92e12f 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -51,7 +51,7 @@ int run_mode = 0; /* foreground logging mode */ * two copies of each - one in main(), one static in log.c... * It also eliminates the 256-char static in log.c */ char *name_p = NULL; -char *version_p = NULL; +const char *version_p = NULL; /* PRC: a high-availability callout program can be specified with -H * When this is done, the program will receive callouts whenever clients @@ -374,7 +374,7 @@ int main (int argc, char **argv) #endif if (!(run_mode & MODE_NODAEMON)) { - int filedes, fdmax, tempfd; + int tempfd; if (pipe(pipefds)<0) { perror("statd: unable to create pipe"); diff --git a/utils/statd/statd.h b/utils/statd/statd.h index 225cc8b..ace2ce5 100644 --- a/utils/statd/statd.h +++ b/utils/statd/statd.h @@ -88,6 +88,6 @@ extern int run_mode; * as to why they're global. */ extern char *name_p; /* program basename */ -extern char *version_p; /* program version */ +extern const char *version_p; /* program version */ extern int re_notify; /* time to re-read notify list */ diff --git a/utils/statd/state.c b/utils/statd/state.c index a6a4077..f46dae5 100644 --- a/utils/statd/state.c +++ b/utils/statd/state.c @@ -28,7 +28,6 @@ void change_state (void) { int fd, size; - extern short int restart; if ((fd = open (SM_STAT_PATH, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) == -1) die ("open (%s): %s", SM_STAT_PATH, strerror (errno)); |