mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Merge pull request #287 from Ben10do/remove-dummymem
Two variables, pSection->Data and tSymbols, were previously set to dummymem, a global variable that was otherwise not used. As this can potentially cause alignment warnings on Clang, this commit replaces that mechanism with a plain old NULL pointer, which is more generally used as a dummy pointer value. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -28,7 +28,6 @@
|
|||||||
struct sSymbol **tSymbols;
|
struct sSymbol **tSymbols;
|
||||||
struct sSection *pSections;
|
struct sSection *pSections;
|
||||||
struct sSection *pLibSections;
|
struct sSection *pLibSections;
|
||||||
uint8_t dummymem;
|
|
||||||
uint8_t oReadLib;
|
uint8_t oReadLib;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -209,7 +208,7 @@ struct sSection *obj_ReadRGBSection(FILE *f)
|
|||||||
if (pSection->nByteSize == 0) {
|
if (pSection->nByteSize == 0) {
|
||||||
/* Skip number of patches */
|
/* Skip number of patches */
|
||||||
readlong(f);
|
readlong(f);
|
||||||
pSection->pData = &dummymem;
|
pSection->pData = NULL;
|
||||||
return pSection;
|
return pSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +282,7 @@ void obj_ReadRGB(FILE *pObjfile, char *tzObjectfile)
|
|||||||
for (i = 0; i < nNumberOfSymbols; i += 1)
|
for (i = 0; i < nNumberOfSymbols; i += 1)
|
||||||
tSymbols[i] = obj_ReadSymbol(pObjfile, tzObjectfile);
|
tSymbols[i] = obj_ReadSymbol(pObjfile, tzObjectfile);
|
||||||
} else {
|
} else {
|
||||||
tSymbols = (struct sSymbol **)&dummymem;
|
tSymbols = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Next we have the sections */
|
/* Next we have the sections */
|
||||||
|
|||||||
Reference in New Issue
Block a user