From 26cc2f400a65b09b27a05349d0134201262dc437 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sun, 30 Sep 2012 14:17:08 +0200 Subject: [PATCH] Don't use %z printf format Some libc's don't support it. Signed-off-by: Ran Benita --- src/xkbcomp/action.c | 4 ++-- test/stringcomp.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c index 47d273c..900ec2d 100644 --- a/src/xkbcomp/action.c +++ b/src/xkbcomp/action.c @@ -784,9 +784,9 @@ HandlePrivate(struct xkb_keymap *keymap, union xkb_action *action, if (ndx < 0 || ndx >= sizeof(act->data)) { log_err(keymap->ctx, - "The data for a private action is %zu bytes long; " + "The data for a private action is %lu bytes long; " "Attempt to use data[%d] ignored\n", - sizeof(act->data), ndx); + (unsigned long) sizeof(act->data), ndx); return false; } diff --git a/test/stringcomp.c b/test/stringcomp.c index e95a3c4..e93791a 100644 --- a/test/stringcomp.c +++ b/test/stringcomp.c @@ -55,8 +55,9 @@ main(int argc, char *argv[]) "round-trip test failed: dumped map differs from original\n"); fprintf(stderr, "path to original file: %s\n", test_get_path(DATA_PATH)); - fprintf(stderr, "length: dumped %zu, original %zu\n", - strlen(dump), strlen(original)); + fprintf(stderr, "length: dumped %lu, original %lu\n", + (unsigned long) strlen(dump), + (unsigned long) strlen(original)); fprintf(stderr, "dumped map:\n"); fprintf(stderr, "%s\n", dump); fflush(stderr); -- 2.34.1