瀏覽代碼

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.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
David Howells 15 年之前
父節點
當前提交
b0706ca415
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/nfs/sysctl.c

+ 2 - 0
fs/nfs/sysctl.c

@@ -15,8 +15,10 @@
 
 
 #include "callback.h"
 #include "callback.h"
 
 
+#ifdef CONFIG_NFS_V4
 static const int nfs_set_port_min = 0;
 static const int nfs_set_port_min = 0;
 static const int nfs_set_port_max = 65535;
 static const int nfs_set_port_max = 65535;
+#endif
 static struct ctl_table_header *nfs_callback_sysctl_table;
 static struct ctl_table_header *nfs_callback_sysctl_table;
 
 
 static ctl_table nfs_cb_sysctls[] = {
 static ctl_table nfs_cb_sysctls[] = {