diff --git a/extflat/EFdef.c b/extflat/EFdef.c index 1947c82c..6eb24b9b 100644 --- a/extflat/EFdef.c +++ b/extflat/EFdef.c @@ -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); diff --git a/extflat/EFflat.c b/extflat/EFflat.c index 6e253af8..25502dbe 100644 --- a/extflat/EFflat.c +++ b/extflat/EFflat.c @@ -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 diff --git a/extflat/EFhier.c b/extflat/EFhier.c index d295437c..efc6cc38 100644 --- a/extflat/EFhier.c +++ b/extflat/EFhier.c @@ -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; diff --git a/extflat/EFname.c b/extflat/EFname.c index 5a5302ec..a8ff4256 100644 --- a/extflat/EFname.c +++ b/extflat/EFname.c @@ -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); diff --git a/extflat/EFsym.c b/extflat/EFsym.c index d3aae30c..3aeaceba 100644 --- a/extflat/EFsym.c +++ b/extflat/EFsym.c @@ -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] = '='; diff --git a/extflat/EFvisit.c b/extflat/EFvisit.c index 285677da..335fa716 100644 --- a/extflat/EFvisit.c +++ b/extflat/EFvisit.c @@ -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); } diff --git a/graphics/grTCairo1.c b/graphics/grTCairo1.c index 30cb777a..bdb2bff3 100644 --- a/graphics/grTCairo1.c +++ b/graphics/grTCairo1.c @@ -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); } diff --git a/graphics/grTCairo5.c b/graphics/grTCairo5.c index 2f1de6eb..1774f657 100644 --- a/graphics/grTCairo5.c +++ b/graphics/grTCairo5.c @@ -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)) { diff --git a/graphics/grTOGL1.c b/graphics/grTOGL1.c index 6b1522ee..400878b8 100644 --- a/graphics/grTOGL1.c +++ b/graphics/grTOGL1.c @@ -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); } diff --git a/graphics/grTOGL5.c b/graphics/grTOGL5.c index ffe271f8..8aadcbba 100644 --- a/graphics/grTOGL5.c +++ b/graphics/grTOGL5.c @@ -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)) { diff --git a/graphics/grTk1.c b/graphics/grTk1.c index 3f080055..ea31b786 100644 --- a/graphics/grTk1.c +++ b/graphics/grTk1.c @@ -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); } diff --git a/graphics/grTk5.c b/graphics/grTk5.c index fa4b155e..beda86f5 100644 --- a/graphics/grTk5.c +++ b/graphics/grTk5.c @@ -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)) {