Bug 7145: fix build with gcc 2.95 & other c89 compilers
Move variable declarations to start of blocks as required by c89
This commit is contained in:
parent
6bd4c25439
commit
179737d4a0
|
@ -523,6 +523,9 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
ExaDriverPtr pScreenInfo)
|
ExaDriverPtr pScreenInfo)
|
||||||
{
|
{
|
||||||
ExaScreenPrivPtr pExaScr;
|
ExaScreenPrivPtr pExaScr;
|
||||||
|
#ifdef RENDER
|
||||||
|
PictureScreenPtr ps;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
|
if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
|
||||||
pScreenInfo->exa_minor > EXA_VERSION_MINOR)
|
pScreenInfo->exa_minor > EXA_VERSION_MINOR)
|
||||||
|
@ -536,7 +539,7 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
ps = GetPictureScreenIfSet(pScreen);
|
||||||
#endif
|
#endif
|
||||||
if (exaGeneration != serverGeneration)
|
if (exaGeneration != serverGeneration)
|
||||||
{
|
{
|
||||||
|
|
|
@ -617,6 +617,9 @@ static Bool
|
||||||
configFiles(XF86ConfFilesPtr fileconf)
|
configFiles(XF86ConfFilesPtr fileconf)
|
||||||
{
|
{
|
||||||
MessageType pathFrom = X_DEFAULT;
|
MessageType pathFrom = X_DEFAULT;
|
||||||
|
int countDirs;
|
||||||
|
char *temp_path;
|
||||||
|
char *log_buf;
|
||||||
|
|
||||||
/* FontPath */
|
/* FontPath */
|
||||||
|
|
||||||
|
@ -676,13 +679,13 @@ configFiles(XF86ConfFilesPtr fileconf)
|
||||||
FatalError("No valid FontPath could be found.");
|
FatalError("No valid FontPath could be found.");
|
||||||
|
|
||||||
/* make fontpath more readable in the logfiles */
|
/* make fontpath more readable in the logfiles */
|
||||||
int countDirs = 1;
|
countDirs = 1;
|
||||||
char *temp_path = defaultFontPath;
|
temp_path = defaultFontPath;
|
||||||
while((temp_path = index(temp_path, ',')) != NULL) {
|
while((temp_path = index(temp_path, ',')) != NULL) {
|
||||||
countDirs++;
|
countDirs++;
|
||||||
temp_path++;
|
temp_path++;
|
||||||
}
|
}
|
||||||
char *log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1);
|
log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1);
|
||||||
if(!log_buf) /* fallback to old method */
|
if(!log_buf) /* fallback to old method */
|
||||||
xf86Msg(pathFrom, "FontPath set to \"%s\"\n", defaultFontPath);
|
xf86Msg(pathFrom, "FontPath set to \"%s\"\n", defaultFontPath);
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue