Don't use %z printf format
authorRan Benita <ran234@gmail.com>
Sun, 30 Sep 2012 12:17:08 +0000 (14:17 +0200)
committerRan Benita <ran234@gmail.com>
Sun, 30 Sep 2012 12:20:16 +0000 (14:20 +0200)
Some libc's don't support it.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/action.c
test/stringcomp.c

index 47d273c..900ec2d 100644 (file)
@@ -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;
             }
 
index e95a3c4..e93791a 100644 (file)
@@ -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);