summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-03-01 13:42:50 +0000
committerDavid Howells <dhowells@redhat.com>2023-03-20 15:10:34 +0000
commitac2d0f3340a819362da460a35dc8e0cd81c0e004 (patch)
treed4ebccb34f3e4a793f9a91eb5fb228063d3db820
parent81a8c963db50681c7470dcfe8fe6c79a70d7aadd (diff)
downloadkeyutils-ac2d0f3340a819362da460a35dc8e0cd81c0e004.tar.gz
Fix format specifier for pointer subtraction
Resolves the following compiler error: keyctl_watch.c: In function 'consumer': keyctl_watch.c:177:61: error: format '%zx' expects argument of type 'size_t', but argument 3 has type 'int' [-Werror=format=] 177 | fprintf(stderr, "NOTIFY[%03zx]: ty=%06x sy=%02x i=%08x\n", | ~~~~^ | | | long unsigned int | %03x 178 | p - buffer, n.n.type, n.n.subtype, n.n.info); | ~~~~~~~~~~ | | | int Signed-off-by: Alyssa Ross <hi@alyssa.is> Signed-off-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20230301134250.301819-1-hi@alyssa.is/
-rw-r--r--keyctl_watch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/keyctl_watch.c b/keyctl_watch.c
index a70a19a..1436c08 100644
--- a/keyctl_watch.c
+++ b/keyctl_watch.c
@@ -179,7 +179,7 @@ int consumer(FILE *log, FILE *gc, int fd)
memcpy(&n, p, largest);
if (debug)
- fprintf(stderr, "NOTIFY[%03zx]: ty=%06x sy=%02x i=%08x\n",
+ fprintf(stderr, "NOTIFY[%03tx]: ty=%06x sy=%02x i=%08x\n",
p - buffer, n.n.type, n.n.subtype, n.n.info);
len = n.n.info & WATCH_INFO_LENGTH;