<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))
|
if (!AddCallback(&ServerGrabCallback,XevieServerGrabStateCallback,NULL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (extEntry = AddExtension (XEVIENAME,
|
if ((extEntry = AddExtension (XEVIENAME,
|
||||||
0,
|
0,
|
||||||
XevieNumberErrors,
|
XevieNumberErrors,
|
||||||
ProcDispatch,
|
ProcDispatch,
|
||||||
SProcDispatch,
|
SProcDispatch,
|
||||||
ResetProc,
|
ResetProc,
|
||||||
StandardMinorOpcode)) {
|
StandardMinorOpcode))) {
|
||||||
ReqCode = (unsigned char)extEntry->base;
|
ReqCode = (unsigned char)extEntry->base;
|
||||||
ErrorBase = extEntry->errorBase;
|
ErrorBase = extEntry->errorBase;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ static XpOidMediumDiscreteSizeList DefaultMediumSizeList = {
|
||||||
&DefaultMediumSize, 1
|
&DefaultMediumSize, 1
|
||||||
};
|
};
|
||||||
static XpOidMediumSourceSize DefaultMediumSourceSize = {
|
static XpOidMediumSourceSize DefaultMediumSourceSize = {
|
||||||
xpoid_unspecified, XpOidMediumSS_DISCRETE, &DefaultMediumSizeList
|
xpoid_unspecified, XpOidMediumSS_DISCRETE, { &DefaultMediumSizeList }
|
||||||
};
|
};
|
||||||
static XpOidMediumSS DefaultMediumSS = {
|
static XpOidMediumSS DefaultMediumSS = {
|
||||||
&DefaultMediumSourceSize, 1
|
&DefaultMediumSourceSize, 1
|
||||||
|
|
|
@ -536,7 +536,7 @@ AugmentPrinterDb(const char *command)
|
||||||
|
|
||||||
#define XP_DESCRIPTOR "xp-printerattr.descriptor="
|
#define XP_DESCRIPTOR "xp-printerattr.descriptor="
|
||||||
#define XP_DESCRIPTOR_LEN (sizeof(XP_DESCRIPTOR)-1)
|
#define XP_DESCRIPTOR_LEN (sizeof(XP_DESCRIPTOR)-1)
|
||||||
while (option = strchr(option, '\t')) {
|
while ((option = strchr(option, '\t'))) {
|
||||||
option++; /* Skip the '\t' */
|
option++; /* Skip the '\t' */
|
||||||
if (!strncmp(option, XP_DESCRIPTOR, XP_DESCRIPTOR_LEN)) {
|
if (!strncmp(option, XP_DESCRIPTOR, XP_DESCRIPTOR_LEN)) {
|
||||||
*(option-1) = '\0'; /* Kill the '\t' (only if we found a valid option) */
|
*(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.
|
* Check for a LANG-specific file.
|
||||||
*/
|
*/
|
||||||
if(dirName = XpGetConfigDir(TRUE))
|
if((dirName = XpGetConfigDir(TRUE)))
|
||||||
{
|
{
|
||||||
filePath = (char *)xalloc(strlen(dirName) +
|
filePath = (char *)xalloc(strlen(dirName) +
|
||||||
strlen(XPRINTERSFILENAME) + 2);
|
strlen(XPRINTERSFILENAME) + 2);
|
||||||
|
@ -774,7 +774,7 @@ GetConfigFileName(void)
|
||||||
xfree(filePath);
|
xfree(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dirName = XpGetConfigDir(FALSE))
|
if((dirName = XpGetConfigDir(FALSE)))
|
||||||
{
|
{
|
||||||
filePath = (char *)xalloc(strlen(dirName) +
|
filePath = (char *)xalloc(strlen(dirName) +
|
||||||
strlen(XPRINTERSFILENAME) + 2);
|
strlen(XPRINTERSFILENAME) + 2);
|
||||||
|
@ -833,7 +833,7 @@ BuildPrinterDb(void)
|
||||||
{
|
{
|
||||||
while((tok = strtok((char *)NULL, " \t")) != (char *)NULL)
|
while((tok = strtok((char *)NULL, " \t")) != (char *)NULL)
|
||||||
{
|
{
|
||||||
if(ptr = MbStrchr(tok, '\012'))
|
if((ptr = MbStrchr(tok, '\012')))
|
||||||
*ptr = (char)'\0';
|
*ptr = (char)'\0';
|
||||||
AddPrinterDbName(tok, NULL);
|
AddPrinterDbName(tok, NULL);
|
||||||
}
|
}
|
||||||
|
@ -1094,7 +1094,7 @@ FindFontDir(
|
||||||
return (char *)NULL;
|
return (char *)NULL;
|
||||||
|
|
||||||
configDir = XpGetConfigDir(TRUE);
|
configDir = XpGetConfigDir(TRUE);
|
||||||
if(fontDir = ValidateFontDir(configDir, modelName))
|
if((fontDir = ValidateFontDir(configDir, modelName)))
|
||||||
{
|
{
|
||||||
xfree(configDir);
|
xfree(configDir);
|
||||||
return fontDir;
|
return fontDir;
|
||||||
|
@ -1215,7 +1215,7 @@ AugmentFontPath(void)
|
||||||
for(i = 0; allIDs != (char **)NULL && allIDs[i] != (char *)NULL; i ++)
|
for(i = 0; allIDs != (char **)NULL && allIDs[i] != (char *)NULL; i ++)
|
||||||
{
|
{
|
||||||
char *fontDir;
|
char *fontDir;
|
||||||
if(fontDir = FindFontDir(allIDs[i]))
|
if((fontDir = FindFontDir(allIDs[i])))
|
||||||
{
|
{
|
||||||
AddToFontPath(fontDir);
|
AddToFontPath(fontDir);
|
||||||
xfree(fontDir);
|
xfree(fontDir);
|
||||||
|
|
|
@ -754,7 +754,7 @@ XpOidLinkedListFirstOid(XpOidLinkedList* me)
|
||||||
XpOid
|
XpOid
|
||||||
XpOidLinkedListNextOid(XpOidLinkedList* me)
|
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;
|
return me->current->oid;
|
||||||
else
|
else
|
||||||
return xpoid_none;
|
return xpoid_none;
|
||||||
|
@ -1716,6 +1716,7 @@ TrayMediumListValidate(XpOidTrayMediumList* me,
|
||||||
* list
|
* list
|
||||||
*/
|
*/
|
||||||
if(tray_ds == (XpOidMediumDiscreteSizeList*)NULL)
|
if(tray_ds == (XpOidMediumDiscreteSizeList*)NULL)
|
||||||
|
{
|
||||||
if(unspecified_tray_ds == (XpOidMediumDiscreteSizeList*)NULL)
|
if(unspecified_tray_ds == (XpOidMediumDiscreteSizeList*)NULL)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -1727,6 +1728,7 @@ TrayMediumListValidate(XpOidTrayMediumList* me,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
tray_ds = unspecified_tray_ds;
|
tray_ds = unspecified_tray_ds;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* loop through the discrete sizes list, looking for a size that
|
* loop through the discrete sizes list, looking for a size that
|
||||||
* matches the medium for the current input tray
|
* matches the medium for the current input tray
|
||||||
|
@ -2554,10 +2556,12 @@ XpOidDocFmtListHasFmt(const XpOidDocFmtList* list,
|
||||||
* variants must both be NULL or match
|
* variants must both be NULL or match
|
||||||
*/
|
*/
|
||||||
if(fmt->variant == (char*)NULL)
|
if(fmt->variant == (char*)NULL)
|
||||||
|
{
|
||||||
if(list->list[i].variant == (char*)NULL)
|
if(list->list[i].variant == (char*)NULL)
|
||||||
return xTrue;
|
return xTrue;
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if(list->list[i].variant == (char*)NULL)
|
if(list->list[i].variant == (char*)NULL)
|
||||||
continue;
|
continue;
|
||||||
if(strcmp(fmt->variant, list->list[i].variant) != 0)
|
if(strcmp(fmt->variant, list->list[i].variant) != 0)
|
||||||
|
@ -2566,10 +2570,12 @@ XpOidDocFmtListHasFmt(const XpOidDocFmtList* list,
|
||||||
* versions must both be NULL or match
|
* versions must both be NULL or match
|
||||||
*/
|
*/
|
||||||
if(fmt->version == (char*)NULL)
|
if(fmt->version == (char*)NULL)
|
||||||
|
{
|
||||||
if(list->list[i].version == (char*)NULL)
|
if(list->list[i].version == (char*)NULL)
|
||||||
return xTrue;
|
return xTrue;
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if(list->list[i].version == (char*)NULL)
|
if(list->list[i].version == (char*)NULL)
|
||||||
continue;
|
continue;
|
||||||
if(strcmp(fmt->version, list->list[i].version) == 0)
|
if(strcmp(fmt->version, list->list[i].version) == 0)
|
||||||
|
|
|
@ -191,6 +191,7 @@ typedef struct
|
||||||
const char* XpOidString(XpOid);
|
const char* XpOidString(XpOid);
|
||||||
int XpOidStringLength(XpOid);
|
int XpOidStringLength(XpOid);
|
||||||
XpOid XpOidFromString(const char* value);
|
XpOid XpOidFromString(const char* value);
|
||||||
|
BOOL XpOidTrayMediumListHasTray(const XpOidTrayMediumList* list, XpOid tray);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XpOidList public methods
|
* XpOidList public methods
|
||||||
|
|
|
@ -603,7 +603,7 @@ PsFontTypeInfoRec *PsCreateFontTypeInfoRec(DrawablePtr pDrawable, FontPtr pFont)
|
||||||
|
|
||||||
rec->next = NULL;
|
rec->next = NULL;
|
||||||
|
|
||||||
if (rec->filename = getFontFilename(pFont))
|
if ((rec->filename = getFontFilename(pFont)))
|
||||||
{
|
{
|
||||||
rec->font_type = getFontFileType(rec->filename);
|
rec->font_type = getFontFileType(rec->filename);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue