[PATCH 22/24] Removed warnings from nfsmount.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



nfsmount.c: In function 'nfsmount':
nfsmount.c:513: warning: missing initializer
nfsmount.c:513: warning: (near initialization for 'mnt_server.saddr')
nfsmount.c:514: warning: missing initializer
nfsmount.c:514: warning: (near initialization for 'nfs_server.saddr')

Signed-off-by: Steve Dickson <steved@xxxxxxxxxx>
---
 utils/mount/nfsmount.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c
index 6b3356c..5b934b5 100644
--- a/utils/mount/nfsmount.c
+++ b/utils/mount/nfsmount.c
@@ -510,8 +510,12 @@ nfsmount(const char *spec, const char *node, int flags,
 	int val;
 	static int doonce = 0;
 
-	clnt_addr_t mnt_server = { &mounthost, };
-	clnt_addr_t nfs_server = { &hostname, };
+	clnt_addr_t mnt_server = { 
+		.hostname = &mounthost 
+	};
+	clnt_addr_t nfs_server = { 
+		.hostname = &hostname 
+	};
 	struct sockaddr_in *nfs_saddr = &nfs_server.saddr;
 	struct pmap  *mnt_pmap = &mnt_server.pmap,
 		     *nfs_pmap = &nfs_server.pmap;
-- 
1.7.0.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux