mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Merge pull request #530 from JL2210/fix-clang
Fix Clang warning in linkdefs
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user