Skip to contentSkip to conversation

NFS: Avoid warnings when CONFIG_NFS_V4=n

PATCH New David Howells 1 participant 1 message Dec 22, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: Avoid warnings when CONFIG_NFS_V4=n

Avoid the following warnings when CONFIG_NFS_V4=n:

fs/nfs/sysctl.c:19: warning: unused variable nfs_set_port_max' fs/nfs/sysctl.c:18: warning: unused variable nfs_set_port_min'

by making those variables contingent on NFSv4 being configured.

---

 fs/nfs/sysctl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/nfs/sysctl.c +2 -0
index 70e1fbb..ad4d2e7 100644
@@ -15,8 +15,10 @@
 
 #include "callback.h"
 
+#ifdef CONFIG_NFS_V4
 static const int nfs_set_port_min = 0;
 static const int nfs_set_port_max = 65535;
+#endif
 static struct ctl_table_header *nfs_callback_sysctl_table;
 
 static ctl_table nfs_cb_sysctls[] = {