diff --git a/extflat/EFbuild.c b/extflat/EFbuild.c index 20c31830..e1688680 100644 --- a/extflat/EFbuild.c +++ b/extflat/EFbuild.c @@ -463,7 +463,7 @@ efBuildDist(def, driver, receiver, min, max) #endif /* notdef */ he = HashFind(&def->def_dists, (char *) &distKey); - if (dist = (Distance *) HashGetValue(he)) + if ((dist = (Distance *) HashGetValue(he))) { /* * There was already an entry in the table; update it @@ -659,7 +659,7 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice) * node that was just removed. */ HashStartSearch(&hs); - while (he = HashNext(&def->def_devs, &hs)) + while ((he = HashNext(&def->def_devs, &hs))) { Dev *dev; int n; @@ -679,7 +679,7 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice) { nn2->efnn_refc += nn1->efnn_refc + 1; HashStartSearch(&hs); - while (he1 = HashNext(&def->def_nodes, &hs)) + while ((he1 = HashNext(&def->def_nodes, &hs))) if ((EFNodeName *)HashGetValue(he1) == nn1) HashSetValue(he1, (char *)nn2); } @@ -687,7 +687,7 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice) { nn1->efnn_refc += nn2->efnn_refc + 1; HashStartSearch(&hs); - while (he2 = HashNext(&def->def_nodes, &hs)) + while ((he2 = HashNext(&def->def_nodes, &hs))) if ((EFNodeName *)HashGetValue(he2) == nn2) HashSetValue(he2, (char *)nn1); } @@ -1757,7 +1757,7 @@ again: *dstp++ = ']'; /* Copy remainder of path */ - while (*dstp++ = *cp++) + while ((*dstp++ = *cp++)) /* Nothing */; cnp->cn_name = StrDup((char **) NULL, newname); @@ -1970,7 +1970,7 @@ efNodeMerge(node1ptr, node2ptr) keeping->efnode_num += removing->efnode_num; /* Merge attribute lists */ - if (ap = removing->efnode_attrs) + if ((ap = removing->efnode_attrs)) { while (ap->efa_next) ap = ap->efa_next; @@ -2059,8 +2059,8 @@ efFreeUseTable(table) EFNodeName *nn; HashStartSearch(&hs); - while (he = HashNext(table, &hs)) - if (use = (Use *) HashGetValue(he)) + while ((he = HashNext(table, &hs))) + if ((use = (Use *) HashGetValue(he))) { if (use->use_id != NULL) freeMagic((char *)use->use_id); freeMagic(use); @@ -2088,7 +2088,7 @@ efFreeDevTable(table) int n; HashStartSearch(&hs); - while (he = HashNext(table, &hs)) + while ((he = HashNext(table, &hs))) { dev = (Dev *)HashGetValue(he); for (n = 0; n < (int)dev->dev_nterm; n++) @@ -2131,8 +2131,8 @@ efFreeNodeTable(table) EFNodeName *nn; HashStartSearch(&hs); - while (he = HashNext(table, &hs)) - if (nn = (EFNodeName *) HashGetValue(he)) + while ((he = HashNext(table, &hs))) + if ((nn = (EFNodeName *) HashGetValue(he))) { for (hn = nn->efnn_hier; hn; hn = hn->hn_parent) (void) HashFind(&efFreeHashTable, (char *) hn); diff --git a/extflat/EFread.c b/extflat/EFread.c index 7692a9d6..29742c72 100644 --- a/extflat/EFread.c +++ b/extflat/EFread.c @@ -670,7 +670,7 @@ resistChanged: /* Read in each def that has not yet been read in */ HashStartSearch(&hs); - while (he = HashNext(&def->def_uses, &hs)) + while ((he = HashNext(&def->def_uses, &hs))) { use = (Use *)HashGetValue(he); if ((use->use_def->def_flags & DEF_AVAILABLE) == 0) diff --git a/extract/ExtArray.c b/extract/ExtArray.c index 2ea8b6ea..b1f9f43f 100644 --- a/extract/ExtArray.c +++ b/extract/ExtArray.c @@ -690,7 +690,7 @@ extArrayAdjust(ha, et1, et2) extHierAdjustments(ha, &ha->ha_cumFlat, et2, et2); HashStartSearch(&hs); - while (he = HashNext(&ha->ha_cumFlat.et_coupleHash, &hs)) + while ((he = HashNext(&ha->ha_cumFlat.et_coupleHash, &hs))) { cap = extGetCapValue(he) / ExtCurStyle->exts_capScale; if (cap == 0) @@ -797,7 +797,7 @@ extArrayTileToNode(tp, pNum, et, ha, doHard) } if (!DebugIsSet(extDebugID, extDebNoHard)) - if (reg = (LabRegion *) extArrayHardNode(tp, pNum, def, ha)) + if ((reg = (LabRegion *) extArrayHardNode(tp, pNum, def, ha))) goto found; /* Blew it */ diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 2c73d98c..8ab90e68 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -4566,7 +4566,7 @@ extNodeAreaFunc(tile, arg) } /* Compute the resistance for the previous region */ - if (old = (NodeRegion *) arg->fra_region) + if ((old = (NodeRegion *) arg->fra_region)) if (ExtOptions & EXT_DORESISTANCE) extSetResist(old); @@ -4946,7 +4946,7 @@ donesides: * 1-lambda halo to find everything it overlaps or touches * on the other plane. */ - if (pMask = DBAllConnPlanes[type]) + if ((pMask = DBAllConnPlanes[type])) { Rect biggerArea; bool is_split = IsSplit(tile); @@ -5029,7 +5029,7 @@ extCapHashKill(ht) HashEntry *he; HashStartSearch(&hs); - while (he = HashNext(ht, &hs)) + while ((he = HashNext(ht, &hs))) { if (HashGetValue(he) != NULL) { diff --git a/extract/ExtCell.c b/extract/ExtCell.c index 48d33751..d425c4d4 100644 --- a/extract/ExtCell.c +++ b/extract/ExtCell.c @@ -215,7 +215,7 @@ extFileOpen(def, file, mode, prealfile) name = def->cd_file; ends = strrchr(def->cd_file, '/'); if (ends == NULL) ends = def->cd_file; - if (endp = strrchr(ends + 1, '.')) + if ((endp = strrchr(ends + 1, '.'))) { name = namebuf; len = endp - def->cd_file; diff --git a/extract/ExtCouple.c b/extract/ExtCouple.c index 80a177d6..9b669248 100644 --- a/extract/ExtCouple.c +++ b/extract/ExtCouple.c @@ -219,7 +219,7 @@ extRelocateSubstrateCoupling(table, subsnode) NodeRegion *rbp; HashStartSearch(&hs); - while (he = HashNext(table, &hs)) + while ((he = HashNext(table, &hs))) { cap = extGetCapValue(he); if (cap == 0) continue; @@ -275,7 +275,7 @@ extOutputCoupling(table, outFile) CapValue cap; /* value of capacitance. */ HashStartSearch(&hs); - while (he = HashNext(table, &hs)) + while ((he = HashNext(table, &hs))) { cap = extGetCapValue(he) / ExtCurStyle->exts_capScale; if (cap == 0) @@ -464,7 +464,7 @@ extAddOverlap(tbelow, ecpls) * Deduct the area shielded from the area of the overlap, so we adjust * the overlap capacitance correspondingly. */ - if (ov.o_pmask = ExtCurStyle->exts_overlapShieldPlanes[ta][tb]) + if ((ov.o_pmask = ExtCurStyle->exts_overlapShieldPlanes[ta][tb])) { ov.o_tmask = ExtCurStyle->exts_overlapShieldTypes[ta][tb]; for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) diff --git a/extract/ExtHard.c b/extract/ExtHard.c index 923c2041..8f1fef43 100644 --- a/extract/ExtHard.c +++ b/extract/ExtHard.c @@ -376,7 +376,7 @@ extHardSetLabel(scx, reg, arg) do { *dstp++ = *srcp++; } while (--prefixlen > 0); } srcp = text; - while (*dstp++ = *srcp++) /* Nothing */; + while ((*dstp++ = *srcp++)) /* Nothing */; arg->hw_label = newlab; if (DebugIsSet(extDebugID, extDebHardWay)) @@ -455,7 +455,7 @@ extHardGenerateLabel(scx, reg, arg) do { *dstp++ = *srcp++; } while (--prefixlen > 0); } srcp = gen; - while (*dstp++ = *srcp++) /* Nothing */; + while ((*dstp++ = *srcp++)) /* Nothing */; arg->hw_label = newlab; if (DebugIsSet(extDebugID, extDebHardWay)) TxPrintf("Hard way: generated label = \"%s\"\n", newlab->lab_text); diff --git a/extract/ExtHier.c b/extract/ExtHier.c index 24c8e036..87d223b8 100644 --- a/extract/ExtHier.c +++ b/extract/ExtHier.c @@ -737,7 +737,7 @@ extHierAdjustments(ha, cumFlat, oneFlat, lookFlat) if (ExtOptions & EXT_DOCOUPLING) { HashStartSearch(&hs); - while (he = HashNext(&oneFlat->et_coupleHash, &hs)) + while ((he = HashNext(&oneFlat->et_coupleHash, &hs))) { ckpOne = ((CoupleKey *) he->h_key.h_words); @@ -828,7 +828,7 @@ extOutputConns(table, outf) HashEntry *he; HashStartSearch(&hs); - while (he = HashNext(table, &hs)) + while ((he = HashNext(table, &hs))) { nfirst = (NodeName *) HashGetValue(he); @@ -838,7 +838,7 @@ extOutputConns(table, outf) * for a node appearing earlier in the table. If so, we need * only free the NodeName without any further processing. */ - if (node = nfirst->nn_node) + if ((node = nfirst->nn_node)) { /* * If there are N names for this node, output N-1 merge lines. @@ -848,7 +848,7 @@ extOutputConns(table, outf) /* Note 3/1/2017: Cap value no longer used */ c = (node->node_cap) / ExtCurStyle->exts_capScale; nn = node->node_names; - if (nnext = nn->nn_next) + if ((nnext = nn->nn_next)) { /* First merge */ fprintf(outf, "merge \"%s\" \"%s\" %lg", @@ -862,7 +862,7 @@ extOutputConns(table, outf) nn->nn_node = (Node *) NULL; /* Processed */ /* Subsequent merges */ - for (nn = nnext; nnext = nn->nn_next; nn = nnext) + for (nn = nnext; (nnext = nn->nn_next); nn = nnext) { fprintf(outf, "merge \"%s\" \"%s\"\n", nn->nn_name, nnext->nn_name); diff --git a/extract/ExtLength.c b/extract/ExtLength.c index bfb2ba6f..b896d3e2 100644 --- a/extract/ExtLength.c +++ b/extract/ExtLength.c @@ -261,7 +261,7 @@ extLength(rootUse, f) * be from a single cell. */ HashStartSearch(&hs); - while (he = HashNext(&extDriverHash, &hs)) + while ((he = HashNext(&extDriverHash, &hs))) { dList = extPathLabel(rootUse, he->h_key.h_name); HashSetValue(he, (ClientData) dList); @@ -273,7 +273,7 @@ extLength(rootUse, f) * then compute and output the distance to each. */ HashStartSearch(&hs); - while (he = HashNext(&extDriverHash, &hs)) + while ((he = HashNext(&extDriverHash, &hs))) { /* Ignore drivers whose labels couldn't be found */ dList = (Label *) HashGetValue(he); @@ -875,7 +875,7 @@ extPathFlood(tile, p, distance, epa) * 1-lambda halo to find everything it overlaps or touches * on the other plane. */ - if (pMask = DBAllConnPlanes[type]) + if ((pMask = DBAllConnPlanes[type])) { int saveplane = epa->epa_pNum; struct extPathFloodArg epfa; diff --git a/extract/ExtMain.c b/extract/ExtMain.c index ab9b38c0..eac2b5ee 100644 --- a/extract/ExtMain.c +++ b/extract/ExtMain.c @@ -496,7 +496,7 @@ ExtUnique(rootUse, option) /* Now process all the cells we just found */ nwarn = 0; - while (def = (CellDef *) StackPop(extDefStack)) + while ((def = (CellDef *) StackPop(extDefStack))) { /* EXT_UNIQ_NOTOPPORTS: Use EXT_UNIQ_ALL on all cells other than the top */ if ((option == EXT_UNIQ_NOTOPPORTS) && @@ -967,7 +967,7 @@ extExtractStack(stack, doExtract, rootDef) CellDef *def; struct saveList *newsl, *sl = (struct saveList *)NULL; - while (def = (CellDef *) StackPop(stack)) + while ((def = (CellDef *) StackPop(stack))) { def->cd_client = (ClientData) 0; if (!SigInterruptPending) diff --git a/extract/ExtNghbors.c b/extract/ExtNghbors.c index bdfa8ce0..9ea7b21a 100644 --- a/extract/ExtNghbors.c +++ b/extract/ExtNghbors.c @@ -295,7 +295,7 @@ donesides: * 1-lambda halo to find everything it overlaps or touches * on the other plane. */ - if (pMask = DBAllConnPlanes[type]) + if ((pMask = DBAllConnPlanes[type])) { TITORECT(tile, &pla.area); GEO_EXPAND(&pla.area, 1, &biggerArea); diff --git a/extract/ExtSubtree.c b/extract/ExtSubtree.c index cd7944ee..d1a854bf 100644 --- a/extract/ExtSubtree.c +++ b/extract/ExtSubtree.c @@ -680,7 +680,7 @@ extSubtreeOutputCoupling(ha) char *name; HashStartSearch(&hs); - while (he = HashNext(&ha->ha_cumFlat.et_coupleHash, &hs)) + while ((he = HashNext(&ha->ha_cumFlat.et_coupleHash, &hs))) { cap = extGetCapValue(he) / ExtCurStyle->exts_capScale; if (cap == 0) diff --git a/extract/ExtTest.c b/extract/ExtTest.c index 7217707e..38b9c3fe 100644 --- a/extract/ExtTest.c +++ b/extract/ExtTest.c @@ -454,7 +454,7 @@ extShowTech(name) out); fprintf(out, "\n"); } - if (e = ExtCurStyle->exts_sideCoupleCap[s][t]) + if ((e = ExtCurStyle->exts_sideCoupleCap[s][t])) for ( ; e; e = e->ec_next) { fprintf(out, " COUPLE: "); @@ -463,7 +463,7 @@ extShowTech(name) extShowMask(&e->ec_far, out); fprintf(out, ": %lf\n", e->ec_cap); } - if (e = ExtCurStyle->exts_sideOverlapCap[s][t]) + if ((e = ExtCurStyle->exts_sideOverlapCap[s][t])) for ( ; e; e = e->ec_next) { fprintf(out, " OVERLAP: "); diff --git a/extract/ExtTimes.c b/extract/ExtTimes.c index 1f1d21e7..7d3a6431 100644 --- a/extract/ExtTimes.c +++ b/extract/ExtTimes.c @@ -213,7 +213,7 @@ ExtTimes(rootUse, f) */ TxPrintf("Computing individual cell statistics:\n"); TxFlush(); HashStartSearch(&hs); - while (he = HashNext(&cellStatsTable, &hs)) + while ((he = HashNext(&cellStatsTable, &hs))) extTimesCellFunc((struct cellStats *) HashGetValue(he)); /* @@ -223,7 +223,7 @@ ExtTimes(rootUse, f) */ TxPrintf("Computing hierarchical and incremental statistics:\n"); TxFlush(); HashStartSearch(&hs); - while (he = HashNext(&cellStatsTable, &hs)) + while ((he = HashNext(&cellStatsTable, &hs))) extTimesIncrFunc((struct cellStats *) HashGetValue(he)); /* @@ -232,7 +232,7 @@ ExtTimes(rootUse, f) */ TxPrintf("Computing summary statistics:\n"); TxFlush(); HashStartSearch(&hs); - while (he = HashNext(&cellStatsTable, &hs)) + while ((he = HashNext(&cellStatsTable, &hs))) { extTimesSummaryFunc((struct cellStats *) HashGetValue(he), f); freeMagic((char *) HashGetValue(he)); diff --git a/extract/ExtYank.c b/extract/ExtYank.c index ace872ee..b89c4256 100644 --- a/extract/ExtYank.c +++ b/extract/ExtYank.c @@ -233,9 +233,9 @@ extHierLabelFunc(scx, label, tpath, targetDef) newlab->lab_flags = label->lab_flags; newlab->lab_port = label->lab_port; dstp = newlab->lab_text; - for (srcp = tpath->tp_first; *dstp++ = *srcp++; ) + for (srcp = tpath->tp_first; (*dstp++ = *srcp++); ) /* Nothing */; - for (--dstp, srcp = label->lab_text; *dstp++ = *srcp++; ) + for (--dstp, srcp = label->lab_text; (*dstp++ = *srcp++); ) /* Nothing */; newlab->lab_next = targetDef->cd_labels;