[PATCH 4/8] nfsumount: Squelch compiler warning

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

 



nfsumount.c: In function ‘nfs_umount_is_vers4’:
nfsumount.c:164: warning: conversion to ‘int’ from ‘size_t’ may alter its value
nfsumount.c:173: warning: conversion to ‘size_t’ from ‘int’ may change the sign of the result

Introduced by commit 3564ebbf.

Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
---

 utils/mount/nfsumount.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c
index b846564..3538d88 100644
--- a/utils/mount/nfsumount.c
+++ b/utils/mount/nfsumount.c
@@ -161,7 +161,8 @@ static int nfs_umount_is_vers4(const struct mntentchn *mc)
 		goto not_found;
 
 	do {
-		int nlen = strlen(pmc->m.mnt_fsname);
+		size_t nlen = strlen(pmc->m.mnt_fsname);
+
 		/*
 		 * It's possible the mount location string in /proc/mounts
 		 * ends with a '/'. In this case, if the entry came from

--
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