[PATCH 3/4] Removed format expects argument of type errors

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

 



idmapd.c: In function 'getfield':
idmapd.c:936:4: error: format '%o' expects argument of type 'unsigned
int *', but argument 3 has type 'int *' [-Werror=format=]
    if ((n = sscanf(bp, "\\%03o", &val)) != 1)

nfsidmap.c: In function 'key_invalidate':
nfsidmap.c:322:3: error: format '%x' expects argument of type 'unsigned
int *', but argument 3 has type 'key_serial_t *' [-Werror=format=]
   sscanf(buf, "%x", &key);

Signed-off-by: Steve Dickson <steved@xxxxxxxxxx>
---
 utils/idmapd/idmapd.c     | 3 ++-
 utils/nfsidmap/nfsidmap.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index b87c4dd..2585fb2 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -923,7 +923,8 @@ static int
 getfield(char **bpp, char *fld, size_t fldsz)
 {
 	char *bp;
-	int val, n;
+	unsigned int val; 
+	int n;
 
 	while ((bp = strsep(bpp, " ")) != NULL && bp[0] == '\0')
 		;
diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
index 374bc5d..d3967a3 100644
--- a/utils/nfsidmap/nfsidmap.c
+++ b/utils/nfsidmap/nfsidmap.c
@@ -283,7 +283,7 @@ static int key_invalidate(char *keystr, int keymask)
 {
 	FILE *fp;
 	char buf[BUFSIZ], *ptr;
-	key_serial_t key;
+	unsigned int key;
 	int mask;
 
 	xlog_syslog(0);
-- 
1.8.3.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