42 x warning: suggest parentheses around assignment used as truth value

EFbuild.c:466:9: warning: suggest parentheses around assignment used as truth value
EFbuild.c:662:20: warning: suggest parentheses around assignment used as truth value
EFbuild.c:682:24: warning: suggest parentheses around assignment used as truth value
EFbuild.c:690:24: warning: suggest parentheses around assignment used as truth value
EFbuild.c:1760:12: warning: suggest parentheses around assignment used as truth value
EFbuild.c:1973:9: warning: suggest parentheses around assignment used as truth value
EFbuild.c:2062:12: warning: suggest parentheses around assignment used as truth value
EFbuild.c:2063:13: warning: suggest parentheses around assignment used as truth value
EFbuild.c:2091:12: warning: suggest parentheses around assignment used as truth value
EFbuild.c:2134:12: warning: suggest parentheses around assignment used as truth value
EFbuild.c:2135:13: warning: suggest parentheses around assignment used as truth value
EFread.c:673:12: warning: suggest parentheses around assignment used as truth value
ExtArray.c:693:12: warning: suggest parentheses around assignment used as truth value
ExtArray.c:800:13: warning: suggest parentheses around assignment used as truth value
ExtBasic.c:4569:9: warning: suggest parentheses around assignment used as truth value
ExtBasic.c:4949:13: warning: suggest parentheses around assignment used as truth value
ExtBasic.c:5032:12: warning: suggest parentheses around assignment used as truth value
ExtCell.c:218:13: warning: suggest parentheses around assignment used as truth value
ExtCouple.c:222:12: warning: suggest parentheses around assignment used as truth value
ExtCouple.c:278:12: warning: suggest parentheses around assignment used as truth value
ExtCouple.c:467:9: warning: suggest parentheses around assignment used as truth value
ExtHard.c:379:12: warning: suggest parentheses around assignment used as truth value
ExtHard.c:458:12: warning: suggest parentheses around assignment used as truth value
ExtHier.c:740:16: warning: suggest parentheses around assignment used as truth value
ExtHier.c:831:12: warning: suggest parentheses around assignment used as truth value
ExtHier.c:841:13: warning: suggest parentheses around assignment used as truth value
ExtHier.c:851:17: warning: suggest parentheses around assignment used as truth value
ExtHier.c:865:34: warning: suggest parentheses around assignment used as truth value
ExtLength.c:264:12: warning: suggest parentheses around assignment used as truth value
ExtLength.c:276:12: warning: suggest parentheses around assignment used as truth value
ExtLength.c:878:9: warning: suggest parentheses around assignment used as truth value
ExtMain.c:499:12: warning: suggest parentheses around assignment used as truth value
ExtMain.c:970:12: warning: suggest parentheses around assignment used as truth value
ExtNghbors.c:298:13: warning: suggest parentheses around assignment used as truth value
ExtSubtree.c:683:12: warning: suggest parentheses around assignment used as truth value
ExtTest.c:457:21: warning: suggest parentheses around assignment used as truth value
ExtTest.c:466:21: warning: suggest parentheses around assignment used as truth value
ExtTimes.c:216:12: warning: suggest parentheses around assignment used as truth value
ExtTimes.c:226:12: warning: suggest parentheses around assignment used as truth value
ExtTimes.c:235:12: warning: suggest parentheses around assignment used as truth value
ExtYank.c:236:34: warning: suggest parentheses around assignment used as truth value
ExtYank.c:238:42: warning: suggest parentheses around assignment used as truth value

GCC14 -Wall cleanup series [-Wparentheses]
This commit is contained in:
Darryl L. Miles
2024-10-09 21:12:55 -04:00
committed by Tim Edwards
parent 6cdb9ad167
commit e3bfe8c59e
15 changed files with 42 additions and 42 deletions
+2 -2
View File
@@ -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 */
+3 -3
View File
@@ -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)
{
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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++)
+2 -2
View File
@@ -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);
+5 -5
View File
@@ -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);
+3 -3
View File
@@ -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;
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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: ");
+3 -3
View File
@@ -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));
+2 -2
View File
@@ -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;