38 x warning: suggest parentheses around assignment used as truth value
EFdef.c:110:12: warning: suggest parentheses around assignment used as truth value EFdef.c:154:12: warning: suggest parentheses around assignment used as truth value EFdef.c:167:12: warning: suggest parentheses around assignment used as truth value EFflat.c:546:17: warning: suggest parentheses around assignment used as truth value EFflat.c:798:12: warning: suggest parentheses around assignment used as truth value EFflat.c:930:13: warning: suggest parentheses around assignment used as truth value EFflat.c:1152:12: warning: suggest parentheses around assignment used as truth value EFflat.c:1157:13: warning: suggest parentheses around assignment used as truth value EFhier.c:84:12: warning: suggest parentheses around assignment used as truth value EFhier.c:261:12: warning: suggest parentheses around assignment used as truth value EFhier.c:489:12: warning: suggest parentheses around assignment used as truth value EFhier.c:682:12: warning: suggest parentheses around assignment used as truth value EFname.c:325:12: warning: suggest parentheses around assignment used as truth value EFname.c:584:13: warning: suggest parentheses around assignment used as truth value EFname.c:632:16: warning: suggest parentheses around assignment used as truth value EFname.c:765:16: warning: suggest parentheses around assignment used as truth value EFname.c:977:12: warning: suggest parentheses around assignment used as truth value EFsym.c:113:13: warning: suggest parentheses around assignment used as truth value EFsym.c:164:9: warning: suggest parentheses around assignment used as truth value EFvisit.c:322:12: warning: suggest parentheses around assignment used as truth value EFvisit.c:627:12: warning: suggest parentheses around assignment used as truth value EFvisit.c:881:16: warning: suggest parentheses around assignment used as truth value EFvisit.c:917:12: warning: suggest parentheses around assignment used as truth value grTk1.c:1325:9: warning: suggest parentheses around assignment used as truth value grTk1.c:1342:9: warning: suggest parentheses around assignment used as truth value grTk1.c:1757:9: warning: suggest parentheses around assignment used as truth value grTk1.c:1766:9: warning: suggest parentheses around assignment used as truth value grTk5.c:177:12: warning: suggest parentheses around assignment used as truth value grTOGL1.c:1095:9: warning: suggest parentheses around assignment used as truth value grTOGL1.c:1111:9: warning: suggest parentheses around assignment used as truth value grTOGL1.c:1542:13: warning: suggest parentheses around assignment used as truth value grTOGL1.c:1551:13: warning: suggest parentheses around assignment used as truth value grTOGL5.c:201:12: warning: suggest parentheses around assignment used as truth value grTCairo1.c:1093:13: warning: suggest parentheses around assignment used as truth value grTCairo1.c:1109:13: warning: suggest parentheses around assignment used as truth value grTCairo1.c:1493:21: warning: suggest parentheses around assignment used as truth value grTCairo1.c:1502:21: warning: suggest parentheses around assignment used as truth value grTCairo5.c:202:16: warning: suggest parentheses around assignment used as truth value GCC14 -Wall cleanup series [-Wparentheses]
This commit is contained in:
parent
e3bfe8c59e
commit
64772655dc
|
|
@ -107,7 +107,7 @@ EFDone(func)
|
|||
int n;
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&efDefHashTable, &hs))
|
||||
while ((he = HashNext(&efDefHashTable, &hs)))
|
||||
{
|
||||
def = (Def *) HashGetValue(he);
|
||||
freeMagic(def->def_name);
|
||||
|
|
@ -151,7 +151,7 @@ EFDone(func)
|
|||
/* Free up the parameter name tables for each device */
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&efDevParamTable, &hs))
|
||||
while ((he = HashNext(&efDevParamTable, &hs)))
|
||||
{
|
||||
DevParam *plist = (DevParam *)HashGetValue(he);
|
||||
while (plist != NULL)
|
||||
|
|
@ -164,7 +164,7 @@ EFDone(func)
|
|||
HashKill(&efDevParamTable);
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&efFreeHashTable, &hs))
|
||||
while ((he = HashNext(&efFreeHashTable, &hs)))
|
||||
{
|
||||
/* Keys of this table are entries to be free'd */
|
||||
freeMagic(he->h_key.h_ptr);
|
||||
|
|
|
|||
|
|
@ -543,7 +543,7 @@ efAddNodes(hc, stdcell)
|
|||
* The name should only have been in the hash table already
|
||||
* if the node was marked with EF_DEVTERM as described above.
|
||||
*/
|
||||
if (oldname = (EFNodeName *) HashGetValue(he))
|
||||
if ((oldname = (EFNodeName *) HashGetValue(he)))
|
||||
{
|
||||
if (hierName != nn->efnn_hier)
|
||||
EFHNFree(hierName, hc->hc_hierName, HN_CONCAT);
|
||||
|
|
@ -795,7 +795,7 @@ efFlatGlob()
|
|||
* also adding it to the global hash table efNodeHashTable.
|
||||
*/
|
||||
HashStartSearch(&hs);
|
||||
while (heGlob = HashNext(&globalTable, &hs))
|
||||
while ((heGlob = HashNext(&globalTable, &hs)))
|
||||
{
|
||||
/*
|
||||
* Add the name to the flat node name hash table, and
|
||||
|
|
@ -927,7 +927,7 @@ efFlatKills(hc)
|
|||
/* Process all of our kill information */
|
||||
for (k = def->def_kills; k; k = k->kill_next)
|
||||
{
|
||||
if (he = EFHNConcatLook(hc->hc_hierName, k->kill_name, "kill"))
|
||||
if ((he = EFHNConcatLook(hc->hc_hierName, k->kill_name, "kill")))
|
||||
{
|
||||
nn = (EFNodeName *) HashGetValue(he);
|
||||
nn->efnn_node->efnode_flags |= EF_KILLED;
|
||||
|
|
@ -1149,12 +1149,12 @@ efFlatDists(hc)
|
|||
|
||||
/* Process our own distances */
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&hc->hc_use->use_def->def_dists, &hs))
|
||||
while ((he = HashNext(&hc->hc_use->use_def->def_dists, &hs)))
|
||||
{
|
||||
dist = (Distance *) HashGetValue(he);
|
||||
efHNBuildDistKey(hc->hc_hierName, dist, &distKey);
|
||||
heFlat = HashFind(&efDistHashTable, (char *) &distKey);
|
||||
if (distFlat = (Distance *) HashGetValue(heFlat))
|
||||
if ((distFlat = (Distance *) HashGetValue(heFlat)))
|
||||
{
|
||||
/*
|
||||
* This code differs from that in efBuildDist(), in that
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ efHierSrUses(hc, func, cdata)
|
|||
HashEntry *he;
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&hc->hc_use->use_def->def_uses, &hs))
|
||||
while ((he = HashNext(&hc->hc_use->use_def->def_uses, &hs)))
|
||||
{
|
||||
u = (Use *)HashGetValue(he);
|
||||
newhc.hc_use = u;
|
||||
|
|
@ -258,7 +258,7 @@ EFHierSrDefs(hc, func, cdata)
|
|||
}
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&hc->hc_use->use_def->def_uses, &hs))
|
||||
while ((he = HashNext(&hc->hc_use->use_def->def_uses, &hs)))
|
||||
{
|
||||
u = (Use *)HashGetValue(he);
|
||||
newhc.hc_use = u;
|
||||
|
|
@ -486,7 +486,7 @@ efHierVisitDevs(hc, ca)
|
|||
|
||||
/* Visit all devices */
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&def->def_devs, &hs))
|
||||
while ((he = HashNext(&def->def_devs, &hs)))
|
||||
{
|
||||
dev = (Dev *)HashGetValue(he);
|
||||
if (efHierDevKilled(hc, dev, hc->hc_hierName))
|
||||
|
|
@ -679,7 +679,7 @@ EFHierVisitCaps(hc, capProc, cdata)
|
|||
/* efCapHashTable using efFlatCaps(). */
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&efCapHashTable, &hs))
|
||||
while ((he = HashNext(&efCapHashTable, &hs)))
|
||||
{
|
||||
ccap = CapHashGetValue(he);
|
||||
ck = (EFCoupleKey *) he->h_key.h_words;
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ efHNToStrFunc(hierName, dstp)
|
|||
}
|
||||
|
||||
srcp = hierName->hn_name;
|
||||
while (*dstp++ = *srcp++)
|
||||
while ((*dstp++ = *srcp++))
|
||||
/* Nothing */;
|
||||
|
||||
return --dstp;
|
||||
|
|
@ -581,7 +581,7 @@ efHNLexOrder(hierName1, hierName2)
|
|||
return 0;
|
||||
|
||||
if (hierName1->hn_parent)
|
||||
if (i = efHNLexOrder(hierName1->hn_parent, hierName2->hn_parent))
|
||||
if ((i = efHNLexOrder(hierName1->hn_parent, hierName2->hn_parent)))
|
||||
return i;
|
||||
|
||||
return strcmp(hierName1->hn_name, hierName2->hn_name);
|
||||
|
|
@ -629,7 +629,7 @@ efHNFromUse(hc, prefix)
|
|||
namePtr = name;
|
||||
srcp = u->use_id;
|
||||
dstp = name;
|
||||
while (*dstp++ = *srcp++)
|
||||
while ((*dstp++ = *srcp++))
|
||||
/* Nothing */;
|
||||
|
||||
/* Array subscript */
|
||||
|
|
@ -762,7 +762,7 @@ efHNInit(hierName, cp, endp)
|
|||
}
|
||||
else
|
||||
{
|
||||
while (*dstp++ = *cp)
|
||||
while ((*dstp++ = *cp))
|
||||
hashsum = HASHADDVAL(hashsum, *cp++);
|
||||
}
|
||||
|
||||
|
|
@ -974,7 +974,7 @@ efHNDump()
|
|||
}
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&efNodeHashTable, &hs))
|
||||
while ((he = HashNext(&efNodeHashTable, &hs)))
|
||||
fprintf(f, "%s\n", EFHNToStr((HierName *) he->h_key.h_ptr));
|
||||
|
||||
(void) fclose(f);
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ efSymAddFile(name)
|
|||
|
||||
for (lineNum = 1; fgets(line, sizeof line, f); lineNum++)
|
||||
{
|
||||
if (cp = strchr(line, '\n'))
|
||||
if ((cp = strchr(line, '\n')))
|
||||
*cp = '\0';
|
||||
if (!efSymAdd(line))
|
||||
TxError("Error at line %d of %s\n", lineNum, name);
|
||||
|
|
@ -161,7 +161,7 @@ efSymAdd(str)
|
|||
}
|
||||
|
||||
value[-1] = '\0';
|
||||
if (he = HashLookOnly(&efSymHash, str))
|
||||
if ((he = HashLookOnly(&efSymHash, str)))
|
||||
{
|
||||
TxError("Symbol \"%s\" already defined\n", str);
|
||||
value[-1] = '=';
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ efVisitDevs(hc, ca)
|
|||
/* Visit our own devices */
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&def->def_devs, &hs))
|
||||
while ((he = HashNext(&def->def_devs, &hs)))
|
||||
{
|
||||
dev = (Dev *)HashGetValue(he);
|
||||
if (efDevKilled(dev, hc->hc_hierName))
|
||||
|
|
@ -624,7 +624,7 @@ EFVisitCaps(capProc, cdata)
|
|||
EFCapValue cap;
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (he = HashNext(&efCapHashTable, &hs))
|
||||
while ((he = HashNext(&efCapHashTable, &hs)))
|
||||
{
|
||||
cap = CapHashGetValue(he);
|
||||
ck = (EFCoupleKey *) he->h_key.h_words;
|
||||
|
|
@ -878,7 +878,7 @@ EFHNOut(hierName, outf)
|
|||
trimLocal = (EFOutputFlags & EF_TRIMLOCAL);
|
||||
convComma = (EFOutputFlags & EF_CONVERTCOMMA);
|
||||
convBrackets = (EFOutputFlags & EF_CONVERTBRACKETS);
|
||||
while (c = *cp++)
|
||||
while ((c = *cp++))
|
||||
{
|
||||
if (*cp)
|
||||
{
|
||||
|
|
@ -914,7 +914,7 @@ efHNOutPrefix(hierName, outf)
|
|||
efHNOutPrefix(hierName->hn_parent, outf);
|
||||
|
||||
cp = hierName->hn_name;
|
||||
while (c = *cp++)
|
||||
while ((c = *cp++))
|
||||
putc(c, outf);
|
||||
putc('/', outf);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1090,7 +1090,7 @@ char *name;
|
|||
WindSeparateRedisplay(w);
|
||||
|
||||
sprintf(windowname, ".magic%d", WindowNumber + 1);
|
||||
if (windowplace = XGetDefault(grXdpy, "magic", windowname))
|
||||
if ((windowplace = XGetDefault(grXdpy, "magic", windowname)))
|
||||
{
|
||||
XParseGeometry(windowplace, &x, &y,
|
||||
(unsigned int *)&width, (unsigned int *)&height);
|
||||
|
|
@ -1106,7 +1106,7 @@ char *name;
|
|||
grAttributes.background_pixel = WhitePixel(grXdpy, grXscrn);
|
||||
grAttributes.border_pixel = BlackPixel(grXdpy, grXscrn);
|
||||
|
||||
if (tktop = Tk_MainWindow(magicinterp))
|
||||
if ((tktop = Tk_MainWindow(magicinterp)))
|
||||
{
|
||||
if (!WindowNumber)
|
||||
{
|
||||
|
|
@ -1490,7 +1490,7 @@ char *text;
|
|||
XSetClassHint( grXdpy, wind, &class);
|
||||
if (text)
|
||||
{
|
||||
if (brack = strchr(text, '['))
|
||||
if ((brack = strchr(text, '[')))
|
||||
{
|
||||
brack--;
|
||||
*brack = 0;
|
||||
|
|
@ -1499,7 +1499,7 @@ char *text;
|
|||
*brack = ' ';
|
||||
return;
|
||||
}
|
||||
if (brack = strrchr(text, ' ')) text = brack + 1;
|
||||
if ((brack = strrchr(text, ' '))) text = brack + 1;
|
||||
XSetIconName(grXdpy, wind, text);
|
||||
XStoreName(grXdpy, wind, text);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ int cursorNum; /* The cursor number as defined in the display
|
|||
tcairoCurrent.cursor = grCursors[cursorNum];
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (entry = HashNext(&grTCairoWindowTable, &hs))
|
||||
while ((entry = HashNext(&grTCairoWindowTable, &hs)))
|
||||
{
|
||||
if (HashGetValue(entry))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1092,7 +1092,7 @@ GrTOGLCreate(w, name)
|
|||
WindSeparateRedisplay(w);
|
||||
|
||||
sprintf(windowname, ".magic%d", WindowNumber + 1);
|
||||
if (windowplace = XGetDefault(grXdpy, "magic", windowname))
|
||||
if ((windowplace = XGetDefault(grXdpy, "magic", windowname)))
|
||||
{
|
||||
XParseGeometry(windowplace,&x,&y,
|
||||
(unsigned int *)&width,(unsigned int *)&height);
|
||||
|
|
@ -1108,7 +1108,7 @@ GrTOGLCreate(w, name)
|
|||
grAttributes.background_pixel = WhitePixel(grXdpy,grXscrn);
|
||||
grAttributes.border_pixel = BlackPixel(grXdpy,grXscrn);
|
||||
|
||||
if (tktop = Tk_MainWindow(magicinterp))
|
||||
if ((tktop = Tk_MainWindow(magicinterp)))
|
||||
{
|
||||
if (!WindowNumber)
|
||||
{
|
||||
|
|
@ -1539,7 +1539,7 @@ GrTOGLIconUpdate(w,text) /* See Blt code */
|
|||
XSetClassHint( grXdpy, wind, &class);
|
||||
if (text)
|
||||
{
|
||||
if (brack = strchr(text,'['))
|
||||
if ((brack = strchr(text,'[')))
|
||||
{
|
||||
brack--;
|
||||
*brack = 0;
|
||||
|
|
@ -1548,7 +1548,7 @@ GrTOGLIconUpdate(w,text) /* See Blt code */
|
|||
*brack = ' ';
|
||||
return;
|
||||
}
|
||||
if (brack = strrchr(text,' ')) text = brack+1;
|
||||
if ((brack = strrchr(text,' '))) text = brack+1;
|
||||
XSetIconName(grXdpy,wind,text);
|
||||
XStoreName(grXdpy,wind,text);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ GrTOGLSetCursor(cursorNum)
|
|||
toglCurrent.cursor = grCursors[cursorNum];
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (entry = HashNext(&grTOGLWindowTable,&hs))
|
||||
while ((entry = HashNext(&grTOGLWindowTable,&hs)))
|
||||
{
|
||||
if (HashGetValue(entry))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1322,7 +1322,7 @@ GrTkCreate(w, name)
|
|||
WindSeparateRedisplay(w);
|
||||
|
||||
sprintf(windowname, ".magic%d", WindowNumber + 1);
|
||||
if (windowplace = XGetDefault(grXdpy, "magic", windowname))
|
||||
if ((windowplace = XGetDefault(grXdpy, "magic", windowname)))
|
||||
{
|
||||
XParseGeometry(windowplace,&x,&y,
|
||||
(unsigned int *)&width,(unsigned int *)&height);
|
||||
|
|
@ -1339,7 +1339,7 @@ GrTkCreate(w, name)
|
|||
if(grClass == 3) grDepth = 8; /* Needed since grDisplay.depth is reset
|
||||
to 7 if Pseudocolor */
|
||||
|
||||
if (tktop = Tk_MainWindow(magicinterp))
|
||||
if ((tktop = Tk_MainWindow(magicinterp)))
|
||||
{
|
||||
if (!WindowNumber)
|
||||
{
|
||||
|
|
@ -1754,7 +1754,7 @@ GrTkIconUpdate(w, text) /* See Blt code */
|
|||
class.res_class = "magic";
|
||||
|
||||
XSetClassHint( grXdpy, wind, &class);
|
||||
if (brack = strchr(text,'['))
|
||||
if ((brack = strchr(text,'[')))
|
||||
{
|
||||
brack--;
|
||||
*brack = 0;
|
||||
|
|
@ -1763,7 +1763,7 @@ GrTkIconUpdate(w, text) /* See Blt code */
|
|||
*brack = ' ';
|
||||
return;
|
||||
}
|
||||
if (brack = strrchr(text,' ')) text = brack+1;
|
||||
if ((brack = strrchr(text,' '))) text = brack+1;
|
||||
XSetIconName(grXdpy,wind,text);
|
||||
XStoreName(grXdpy,wind,text);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ GrTkSetCursor(cursorNum)
|
|||
grCurrent.cursor = grCursors[cursorNum];
|
||||
|
||||
HashStartSearch(&hs);
|
||||
while (entry = HashNext(&grTkWindowTable,&hs))
|
||||
while ((entry = HashNext(&grTkWindowTable,&hs)))
|
||||
{
|
||||
if (HashGetValue(entry))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue