A nice patch from Larry Doolittle that adds -Wshadow and
cleans up most of the now-revealed problems.
diff --git a/nfsmount.c b/nfsmount.c
index cd81510..6643ed5 100644
--- a/nfsmount.c
+++ b/nfsmount.c
@@ -157,7 +157,7 @@
#define HAVE_personality
#define HAVE_tm_gmtoff
-static char *nfs_strerror(int stat);
+static char *nfs_strerror(int status);
#define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r))
#define MAX_NFSPROT ((nfs_mount_version >= 4) ? 3 : 2)
@@ -873,16 +873,16 @@
{ -1, EIO }
};
-static char *nfs_strerror(int stat)
+static char *nfs_strerror(int status)
{
int i;
static char buf[256];
for (i = 0; nfs_errtbl[i].stat != -1; i++) {
- if (nfs_errtbl[i].stat == stat)
+ if (nfs_errtbl[i].stat == status)
return strerror(nfs_errtbl[i].errnum);
}
- sprintf(buf, _("unknown nfs status return value: %d"), stat);
+ sprintf(buf, _("unknown nfs status return value: %d"), status);
return buf;
}