diff options
author | Neil Brown <neilb@suse.de> | 2007-07-29 17:20:10 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-07-29 17:20:10 +1000 |
commit | 5835b1eec5a1f1e463c0762c510c6643fa2bff62 (patch) | |
tree | 7a8b95c1b9b1273be2272a2dd9302265f9839e4d /utils/showmount | |
parent | dd087896285da9e160e13ee9f7d75381b67895e3 (diff) | |
download | nfs-utils-5835b1eec5a1f1e463c0762c510c6643fa2bff62.tar.gz |
Add -Wstrict-prototypes to compiler args, and fix warnings caused.
Diffstat (limited to 'utils/showmount')
-rw-r--r-- | utils/showmount/showmount.c | 14 |
1 files changed, 5 insertions, 9 deletions
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; |