[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190410220301.2332-1-louis@kragniz.eu>
Date: Wed, 10 Apr 2019 23:03:01 +0100
From: Louis Taylor <louis@...gniz.eu>
To: dhowells@...hat.com
Cc: linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org,
clang-built-linux@...glegroups.com, Louis Taylor <louis@...gniz.eu>
Subject: [PATCH] afs: use correct format characters
When compiling with -Wformat, clang warns:
fs/afs/flock.c:632:29: warning: format specifies type 'short' but the argument has type
'unsigned char' [-Wformat]
_leave(" = %d [%hd]", ret, fl->fl_type);
~~~ ^~~~~~~~~~~
fl_type is declared as an unsigned char unconditionally in
include/linux/fs.h, so use the correct format characters.
Link: https://github.com/ClangBuiltLinux/linux/issues/378
Signed-off-by: Louis Taylor <louis@...gniz.eu>
---
fs/afs/flock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/afs/flock.c b/fs/afs/flock.c
index 6a0174258382..be4c3f6a3178 100644
--- a/fs/afs/flock.c
+++ b/fs/afs/flock.c
@@ -629,7 +629,7 @@ static int afs_do_getlk(struct file *file, struct file_lock *fl)
ret = 0;
error:
- _leave(" = %d [%hd]", ret, fl->fl_type);
+ _leave(" = %d [%hhu]", ret, fl->fl_type);
return ret;
}
--
2.21.0
Powered by blists - more mailing lists