Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

samples: uhid: fix warnings in uhid-example

Fix warnings seen when building for 32-bit architecture.

Use "%xd" for arguments of type size_t to fix the warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Sam Ravnborg and committed by
Masahiro Yamada
8a45fe70 e079a08c

+2 -2
+2 -2
samples/uhid/uhid-example.c
··· 165 165 fprintf(stderr, "Cannot write to uhid: %m\n"); 166 166 return -errno; 167 167 } else if (ret != sizeof(*ev)) { 168 - fprintf(stderr, "Wrong size written to uhid: %ld != %lu\n", 168 + fprintf(stderr, "Wrong size written to uhid: %zd != %zu\n", 169 169 ret, sizeof(ev)); 170 170 return -EFAULT; 171 171 } else { ··· 236 236 fprintf(stderr, "Cannot read uhid-cdev: %m\n"); 237 237 return -errno; 238 238 } else if (ret != sizeof(ev)) { 239 - fprintf(stderr, "Invalid size read from uhid-dev: %ld != %lu\n", 239 + fprintf(stderr, "Invalid size read from uhid-dev: %zd != %zu\n", 240 240 ret, sizeof(ev)); 241 241 return -EFAULT; 242 242 }