From a5e3a7cbc938b98bf2b4e8de4e852a80777eb3e6 Mon Sep 17 00:00:00 2001 From: Ben10do Date: Wed, 6 Jun 2018 19:20:25 +0100 Subject: [PATCH] =?UTF-8?q?Replace=20pointers=20to=20=E2=80=98dummymem?= =?UTF-8?q?=E2=80=99=20with=20NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Ben10do --- src/link/object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/link/object.c b/src/link/object.c index 023d562e..818adbd7 100644 --- a/src/link/object.c +++ b/src/link/object.c @@ -28,7 +28,6 @@ struct sSymbol **tSymbols; struct sSection *pSections; struct sSection *pLibSections; -uint8_t dummymem; uint8_t oReadLib; /* @@ -209,7 +208,7 @@ struct sSection *obj_ReadRGBSection(FILE *f) if (pSection->nByteSize == 0) { /* Skip number of patches */ readlong(f); - pSection->pData = &dummymem; + pSection->pData = NULL; return pSection; } @@ -283,7 +282,7 @@ void obj_ReadRGB(FILE *pObjfile, char *tzObjectfile) for (i = 0; i < nNumberOfSymbols; i += 1) tSymbols[i] = obj_ReadSymbol(pObjfile, tzObjectfile); } else { - tSymbols = (struct sSymbol **)&dummymem; + tSymbols = NULL; } /* Next we have the sections */