mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-15 00:13:28 +00:00
<https://bugs.freedesktop.org/attachment.cgi?id=2325> Avoid 38 gcc-3.4.2 warnings: suggest parentheses around assignment used as truth value suggest explicit braces to avoid ambiguous `else' suggest parentheses around && within || suggest parentheses around arithmetic in operand of ^ "/*" within comment (Peter Breitenlohner) Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2326 <https://bugs.freedesktop.org/attachment.cgi?id=2326> This patch removes these 2 gcc-3.4.3 warnings: missing braces around initializer implicit declaration of function `XpOidTrayMediumListHasTray' (Peter Breitenlohner)
This commit is contained in:
parent
4047191124
commit
f86562540d
6 changed files with 18 additions and 11 deletions
|
|
@ -536,7 +536,7 @@ AugmentPrinterDb(const char *command)
|
|||
|
||||
#define XP_DESCRIPTOR "xp-printerattr.descriptor="
|
||||
#define XP_DESCRIPTOR_LEN (sizeof(XP_DESCRIPTOR)-1)
|
||||
while (option = strchr(option, '\t')) {
|
||||
while ((option = strchr(option, '\t'))) {
|
||||
option++; /* Skip the '\t' */
|
||||
if (!strncmp(option, XP_DESCRIPTOR, XP_DESCRIPTOR_LEN)) {
|
||||
*(option-1) = '\0'; /* Kill the '\t' (only if we found a valid option) */
|
||||
|
|
@ -755,7 +755,7 @@ GetConfigFileName(void)
|
|||
/*
|
||||
* Check for a LANG-specific file.
|
||||
*/
|
||||
if(dirName = XpGetConfigDir(TRUE))
|
||||
if((dirName = XpGetConfigDir(TRUE)))
|
||||
{
|
||||
filePath = (char *)xalloc(strlen(dirName) +
|
||||
strlen(XPRINTERSFILENAME) + 2);
|
||||
|
|
@ -774,7 +774,7 @@ GetConfigFileName(void)
|
|||
xfree(filePath);
|
||||
}
|
||||
|
||||
if(dirName = XpGetConfigDir(FALSE))
|
||||
if((dirName = XpGetConfigDir(FALSE)))
|
||||
{
|
||||
filePath = (char *)xalloc(strlen(dirName) +
|
||||
strlen(XPRINTERSFILENAME) + 2);
|
||||
|
|
@ -833,7 +833,7 @@ BuildPrinterDb(void)
|
|||
{
|
||||
while((tok = strtok((char *)NULL, " \t")) != (char *)NULL)
|
||||
{
|
||||
if(ptr = MbStrchr(tok, '\012'))
|
||||
if((ptr = MbStrchr(tok, '\012')))
|
||||
*ptr = (char)'\0';
|
||||
AddPrinterDbName(tok, NULL);
|
||||
}
|
||||
|
|
@ -1094,7 +1094,7 @@ FindFontDir(
|
|||
return (char *)NULL;
|
||||
|
||||
configDir = XpGetConfigDir(TRUE);
|
||||
if(fontDir = ValidateFontDir(configDir, modelName))
|
||||
if((fontDir = ValidateFontDir(configDir, modelName)))
|
||||
{
|
||||
xfree(configDir);
|
||||
return fontDir;
|
||||
|
|
@ -1215,7 +1215,7 @@ AugmentFontPath(void)
|
|||
for(i = 0; allIDs != (char **)NULL && allIDs[i] != (char *)NULL; i ++)
|
||||
{
|
||||
char *fontDir;
|
||||
if(fontDir = FindFontDir(allIDs[i]))
|
||||
if((fontDir = FindFontDir(allIDs[i])))
|
||||
{
|
||||
AddToFontPath(fontDir);
|
||||
xfree(fontDir);
|
||||
|
|
|
|||
Loading…
Reference in a new issue