From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH 3/4] Removed format expects argument of type errors
Date: Mon, 4 Jun 2018 10:50:50 -0400 [thread overview]
Message-ID: <20180604145051.146390-4-steved@redhat.com> (raw)
In-Reply-To: <20180604145051.146390-1-steved@redhat.com>
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(-)
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
next prev parent reply other threads:[~2018-06-04 14:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 14:50 [PATCH 0/4] Removed more warnings that now errors via -W Steve Dickson
2018-06-04 14:50 ` [PATCH 1/4] xtab.c: Removed overflow in implicit constant conversion errors Steve Dickson
2018-06-04 15:03 ` Chuck Lever
2018-06-04 14:50 ` [PATCH 2/4] Removed ISO C does not support the '%m' gnu_printf format errors Steve Dickson
2018-06-04 14:50 ` Steve Dickson [this message]
2018-06-04 14:50 ` [PATCH 4/4] gssd.c: Remomved a couple of warning errors Steve Dickson
2018-06-05 17:21 ` [PATCH 0/4] Removed more warnings that now errors via -W Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180604145051.146390-4-steved@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).