<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
|
@ -142,13 +142,13 @@ XevieExtensionInit ()
|
|||
if (!AddCallback(&ServerGrabCallback,XevieServerGrabStateCallback,NULL))
|
||||
return;
|
||||
|
||||
if (extEntry = AddExtension (XEVIENAME,
|
||||
if ((extEntry = AddExtension (XEVIENAME,
|
||||
0,
|
||||
XevieNumberErrors,
|
||||
ProcDispatch,
|
||||
SProcDispatch,
|
||||
ResetProc,
|
||||
StandardMinorOpcode)) {
|
||||
StandardMinorOpcode))) {
|
||||
ReqCode = (unsigned char)extEntry->base;
|
||||
ErrorBase = extEntry->errorBase;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ static XpOidMediumDiscreteSizeList DefaultMediumSizeList = {
|
|||
&DefaultMediumSize, 1
|
||||
};
|
||||
static XpOidMediumSourceSize DefaultMediumSourceSize = {
|
||||
xpoid_unspecified, XpOidMediumSS_DISCRETE, &DefaultMediumSizeList
|
||||
xpoid_unspecified, XpOidMediumSS_DISCRETE, { &DefaultMediumSizeList }
|
||||
};
|
||||
static XpOidMediumSS DefaultMediumSS = {
|
||||
&DefaultMediumSourceSize, 1
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -754,7 +754,7 @@ XpOidLinkedListFirstOid(XpOidLinkedList* me)
|
|||
XpOid
|
||||
XpOidLinkedListNextOid(XpOidLinkedList* me)
|
||||
{
|
||||
if(me->current ? me->current = me->current->next : xFalse)
|
||||
if(me->current ? (me->current = me->current->next) : xFalse)
|
||||
return me->current->oid;
|
||||
else
|
||||
return xpoid_none;
|
||||
|
@ -1716,6 +1716,7 @@ TrayMediumListValidate(XpOidTrayMediumList* me,
|
|||
* list
|
||||
*/
|
||||
if(tray_ds == (XpOidMediumDiscreteSizeList*)NULL)
|
||||
{
|
||||
if(unspecified_tray_ds == (XpOidMediumDiscreteSizeList*)NULL)
|
||||
{
|
||||
/*
|
||||
|
@ -1727,6 +1728,7 @@ TrayMediumListValidate(XpOidTrayMediumList* me,
|
|||
}
|
||||
else
|
||||
tray_ds = unspecified_tray_ds;
|
||||
}
|
||||
/*
|
||||
* loop through the discrete sizes list, looking for a size that
|
||||
* matches the medium for the current input tray
|
||||
|
@ -2554,10 +2556,12 @@ XpOidDocFmtListHasFmt(const XpOidDocFmtList* list,
|
|||
* variants must both be NULL or match
|
||||
*/
|
||||
if(fmt->variant == (char*)NULL)
|
||||
{
|
||||
if(list->list[i].variant == (char*)NULL)
|
||||
return xTrue;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
if(list->list[i].variant == (char*)NULL)
|
||||
continue;
|
||||
if(strcmp(fmt->variant, list->list[i].variant) != 0)
|
||||
|
@ -2566,10 +2570,12 @@ XpOidDocFmtListHasFmt(const XpOidDocFmtList* list,
|
|||
* versions must both be NULL or match
|
||||
*/
|
||||
if(fmt->version == (char*)NULL)
|
||||
{
|
||||
if(list->list[i].version == (char*)NULL)
|
||||
return xTrue;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
if(list->list[i].version == (char*)NULL)
|
||||
continue;
|
||||
if(strcmp(fmt->version, list->list[i].version) == 0)
|
||||
|
|
|
@ -191,6 +191,7 @@ typedef struct
|
|||
const char* XpOidString(XpOid);
|
||||
int XpOidStringLength(XpOid);
|
||||
XpOid XpOidFromString(const char* value);
|
||||
BOOL XpOidTrayMediumListHasTray(const XpOidTrayMediumList* list, XpOid tray);
|
||||
|
||||
/*
|
||||
* XpOidList public methods
|
||||
|
|
|
@ -603,7 +603,7 @@ PsFontTypeInfoRec *PsCreateFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont)
|
|||
|
||||
rec->next = NULL;
|
||||
|
||||
if (rec->filename = getFontFilename(pFont))
|
||||
if ((rec->filename = getFontFilename(pFont)))
|
||||
{
|
||||
rec->font_type = getFontFileType(rec->filename);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user