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

@@ -384,7 +384,8 @@ static uint16_t writeMapBank(struct SortedSections const *sectList,
used += sect->size;
if (sect->size != 0)
fprintf(mapFile, " SECTION: $%04" PRIx16 "-$%04" PRIx16 " ($%04" PRIx16 " byte%s) [\"%s\"]\n",
fprintf(mapFile, " SECTION: $%04" PRIx16 "-$%04x ($%04" PRIx16
" byte%s) [\"%s\"]\n",
sect->org, sect->org + sect->size - 1,
sect->size, sect->size == 1 ? "" : "s",
sect->name);