src/data/mdd-writer.c: Avoid compiler warning
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 29 Sep 2018 10:27:31 +0000 (12:27 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 29 Sep 2018 10:27:31 +0000 (12:27 +0200)
src/data/mdd-writer.c

index a4d4e26f2e4e4c6e4889e53ea4bf72ba59b77493..bc8b54cd8b786aa74f3454854be9a3b004a2e0cb 100644 (file)
@@ -434,10 +434,10 @@ mdd_write (struct file_handle *fh, struct dictionary *dict,
       const struct variable *var = dict_get_var (dict, i);
       xmlTextWriterStartElement (w->writer, _xml ("variable"));
       xmlTextWriterWriteFormatAttribute (w->writer, _xml ("id"),
-                                         "_%d", i + 1);
+                                         "_%zu", i + 1);
       write_attr (w->writer, "name", var_get_name (var));
       xmlTextWriterWriteFormatAttribute (w->writer, _xml ("ref"),
-                                         "%d", i + 1);
+                                         "%zu", i + 1);
       xmlTextWriterEndElement (w->writer);
     }
   write_empty_element (w->writer, "deleted");
@@ -522,7 +522,7 @@ mdd_write (struct file_handle *fh, struct dictionary *dict,
                   write_attr (w->writer, "name", label);
                   xmlTextWriterWriteFormatAttribute (
                     w->writer, _xml ("value"),
-                    "%d", string_set_count (&categories));
+                    "%zu", string_set_count (&categories));
                   xmlTextWriterEndElement (w->writer);
                 }
             }