Commit 415c3629 authored by Tim Rühsen's avatar Tim Rühsen

Use printf's %u instead of %zu for better compatibility

parent c4be3879
Pipeline #23015014 passed with stages
in 17 minutes 8 seconds
......@@ -70,7 +70,7 @@ static void test_all_from(const char *dirname)
printf("testing %llu bytes from '%s'\n", (unsigned long long) st.st_size, fname);
LLVMFuzzerTestOneInput(data, st.st_size);
} else
fprintf(stderr, "Failed to read %llu bytes from %s (%d), got %zd\n", (unsigned long long) st.st_size, fname, errno, n);
fprintf(stderr, "Failed to read %llu bytes from %s (%d), got %d\n", (unsigned long long) st.st_size, fname, errno, (int) n);
free(data);
close(fd);
......
......@@ -87,7 +87,7 @@ _idn2_bidi (const uint32_t * label, size_t llen)
for (size_t it = 1; it < llen; it++) {
bc = uc_bidi_category(label[it]);
/* printf("Label[%zu]=%04X: %s\n", it, label[it], uc_bidi_category_name(bc)); */
/* printf("Label[%d]=%04X: %s\n", (int) it, label[it], uc_bidi_category_name(bc)); */
if (bc == UC_BIDI_R || bc == UC_BIDI_AL || bc == UC_BIDI_EN || bc == UC_BIDI_AN || bc == UC_BIDI_NSM) {
endok = 1;
} else {
......
......@@ -298,7 +298,7 @@ read_IdnaMappings (char *linep)
{
map->offset = mapdata_pos;
if (map->offset != mapdata_pos)
printf ("offset overflow (%zu)\n", mapdata_pos);
printf ("offset overflow (%u)\n", (unsigned) mapdata_pos);
}
tmp[map->nmappings] = cp;
......@@ -665,14 +665,14 @@ main (void)
_print_tr46_map (0x10000, 0xFFFFFF, 1);
printf ("};\n\n");
printf ("static const uint8_t mapdata[%zu] = {\n", mapdata_pos);
printf ("static const uint8_t mapdata[%u] = {\n", (unsigned) mapdata_pos);
for (it = 0; it < mapdata_pos; it++)
{
printf ("0x%02X,%s", genmapdata[it], it % 16 == 15 ? "\n" : "");
}
printf ("};\n\n");
printf ("static const NFCQCMap nfcqc_map[%zu] = {\n", nfcqc_pos);
printf ("static const NFCQCMap nfcqc_map[%u] = {\n", (unsigned) nfcqc_pos);
for (it = 0; it < nfcqc_pos; it++)
{
NFCQCMap *map = nfcqc_map + it;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment