From 480832dcecdf63fa6f115ba3a09a1befd511f290 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 17 Feb 2014 15:39:29 -0800 Subject: [PATCH] Fix printf() format specifiers. My main development machine is 32-bit, so I didn't see these. --- src/data/sys-file-reader.c | 2 +- src/language/dictionary/sys-file-info.c | 4 ++-- src/math/categoricals.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index ef8950be62..0571d15eb9 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -1188,7 +1188,7 @@ read_value_label_record (struct sfm_reader *r, if (record->n_vars < 1 || record->n_vars > r->n_vars) { sys_error (r, r->pos - 4, - _("Number of variables associated with a value label (%zu) " + _("Number of variables associated with a value label (%u) " "is not between 1 and the number of variables (%zu)."), record->n_vars, r->n_vars); return false; diff --git a/src/language/dictionary/sys-file-info.c b/src/language/dictionary/sys-file-info.c index 05f9be91fb..722b512cd7 100644 --- a/src/language/dictionary/sys-file-info.c +++ b/src/language/dictionary/sys-file-info.c @@ -1029,7 +1029,7 @@ report_encodings (const struct file_handle *h, const struct sfm_reader *r) ds_put_format (&s, "%s, ", encoding_names[j]); ds_chomp (&s, ss_cstr (", ")); - tab_text_format (t, 0, i + 1, TAB_RIGHT, "%d", i + 1); + tab_text_format (t, 0, i + 1, TAB_RIGHT, "%zu", i + 1); tab_text (t, 1, i + 1, TAB_LEFT, ds_cstr (&s)); ds_destroy (&s); } @@ -1076,7 +1076,7 @@ report_encodings (const struct file_handle *h, const struct sfm_reader *r) { const char *s = encodings[j].utf8_strings[i] + prefix; - tab_text_format (t, 1, row, TAB_RIGHT, "%d", j + 1); + tab_text_format (t, 1, row, TAB_RIGHT, "%zu", j + 1); if (prefix || suffix) { size_t len = strlen (s) - suffix; diff --git a/src/math/categoricals.c b/src/math/categoricals.c index b1afd11c8c..b621d98293 100644 --- a/src/math/categoricals.c +++ b/src/math/categoricals.c @@ -217,7 +217,7 @@ categoricals_dump (const struct categoricals *cat) } printf ("\n"); - printf ("Number of interactions %d\n", cat->n_iap); + printf ("Number of interactions %zu\n", cat->n_iap); for (i = 0 ; i < cat->n_iap; ++i) { int v; -- 2.30.2