Message ID | 20180604145051.146390-4-steved@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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);
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@redhat.com> --- utils/idmapd/idmapd.c | 3 ++- utils/nfsidmap/nfsidmap.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)