Fix -Wformat build warnings on macOS

C arithmetic promotes certain expressions to `int`,
so formatting has to use "%d" or "%x", not inttypes.h.

Fixes #883
This commit is contained in:
Rangi
2021-05-04 21:05:38 -04:00
committed by Rangi
parent c06985a7ad
commit 869021f47d
4 changed files with 19 additions and 19 deletions

View File

@@ -337,7 +337,7 @@ static void placeSection(struct Section *section)
section->name, typeNames[section->type], where);
/* If the section just can't fit the bank, report that */
else if (section->org + section->size > endaddr(section->type) + 1)
errx(1, "Unable to place \"%s\" (%s section) %s: section runs past end of region ($%04" PRIx16 " > $%04" PRIx16 ")",
errx(1, "Unable to place \"%s\" (%s section) %s: section runs past end of region ($%04x > $%04x)",
section->name, typeNames[section->type], where,
section->org + section->size, endaddr(section->type) + 1);
/* Otherwise there is overlap with another section */