Fix Clang warning in linkdefs

This one's really stupid; printing an int with %hhu gives a warning
even though a regular unsigned char is promoted to an int before
printing anyway. Silence it so the build with Clang works.

This is a regression introduced in 5c24de3
This commit is contained in:
James Larrowe
2020-06-23 23:25:46 -04:00
parent f996186fae
commit 240fca0861
2 changed files with 5 additions and 5 deletions

View File

@@ -12,8 +12,8 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#define RGBDS_OBJECT_VERSION_STRING "RGB%1hhu" #define RGBDS_OBJECT_VERSION_STRING "RGB%1u"
#define RGBDS_OBJECT_VERSION_NUMBER 9 #define RGBDS_OBJECT_VERSION_NUMBER 9U
#define RGBDS_OBJECT_REV 4U #define RGBDS_OBJECT_REV 4U
enum AssertionType { enum AssertionType {

View File

@@ -400,18 +400,18 @@ void obj_ReadFile(char const *fileName)
err(1, "Could not open file %s", fileName); err(1, "Could not open file %s", fileName);
/* Begin by reading the magic bytes and version number */ /* Begin by reading the magic bytes and version number */
uint8_t versionNumber; unsigned versionNumber;
int matchedElems = fscanf(file, RGBDS_OBJECT_VERSION_STRING, int matchedElems = fscanf(file, RGBDS_OBJECT_VERSION_STRING,
&versionNumber); &versionNumber);
if (matchedElems != 1) if (matchedElems != 1)
errx(1, "\"%s\" is not a RGBDS object file", fileName); errx(1, "\"%s\" is not a RGBDS object file", fileName);
verbosePrint("Reading object file %s, version %hhu\n", verbosePrint("Reading object file %s, version %u\n",
fileName, versionNumber); fileName, versionNumber);
if (versionNumber != RGBDS_OBJECT_VERSION_NUMBER) if (versionNumber != RGBDS_OBJECT_VERSION_NUMBER)
errx(1, "\"%s\" is an incompatible version %hhu object file", errx(1, "\"%s\" is an incompatible version %u object file",
fileName, versionNumber); fileName, versionNumber);
uint32_t revNum; uint32_t revNum;