<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:
Alan Coopersmith 2005-07-07 02:47:06 +00:00
commit f86562540d
6 changed files with 18 additions and 11 deletions

View file

@ -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);