xf86bigfont: Silence compiler warning by initializing pDesc.

Access to pDesc was always guarded by (nCharInfos > 0), so the code
wasn't actually buggy, but this makes it clear that it's correct.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
This commit is contained in:
Jamey Sharp 2010-05-25 10:30:58 -07:00
parent 4e9d3e4132
commit 0a98d9e6ce

View File

@ -404,7 +404,7 @@ ProcXF86BigfontQueryFont(
int nCharInfos;
int shmid;
#ifdef HAS_SHM
ShmDescPtr pDesc;
ShmDescPtr pDesc = NULL;
#else
#define pDesc 0
#endif
@ -449,8 +449,6 @@ ProcXF86BigfontQueryFont(
#ifdef HAS_SHM
if (!badSysCall)
pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex);
else
pDesc = NULL;
if (pDesc) {
pCI = (xCharInfo *) pDesc->attach_addr;
if (stuff_flags & XF86Bigfont_FLAGS_Shm)