12 x warning: suggest parentheses around '&&' within '||'
The '&' has higher precedence, so the expression of the '&' side receive extra parentheses. ResMakeRes.c:671:37: warning: suggest parentheses around '&&' within '||' ResMakeRes.c:942:32: warning: suggest parentheses around '&&' within '||' ResSimple.c:201:70: warning: suggest parentheses around '&&' within '||' ResRex.c:1036:28: warning: suggest parentheses around '&&' within '||' ResRex.c:1038:50: warning: suggest parentheses around '&&' within '||' ext2sim.c:1341:47: warning: suggest parentheses around '&&' within '||' ext2spice.c:172:44: warning: suggest parentheses around '&&' within '||' ext2spice.c:173:49: warning: suggest parentheses around '&&' within '||' ext2spice.c:3655:50: warning: suggest parentheses around '&&' within '||' ext2hier.c:1412:50: warning: suggest parentheses around '&&' within '||' gcrDebug.c:638:55: warning: suggest parentheses around '&&' within '||' selEnum.c:323:28: warning: suggest parentheses around '&&' within '||' GCC14 -Wall cleanup series [-Wparentheses]
This commit is contained in:
parent
239366d4b6
commit
be09edb8d8
|
|
@ -1338,8 +1338,8 @@ FILE *outf;
|
||||||
suf = EFHNToStr(suffix);
|
suf = EFHNToStr(suffix);
|
||||||
if (fetInfo[type].defSubs && strcasecmp(suf,fetInfo[type].defSubs) == 0) {
|
if (fetInfo[type].defSubs && strcasecmp(suf,fetInfo[type].defSubs) == 0) {
|
||||||
l = strlen(suf) - 1;
|
l = strlen(suf) - 1;
|
||||||
if ( ( EFOutputFlags & EF_TRIMGLOB ) && suf[l] =='!' ||
|
if ( (( EFOutputFlags & EF_TRIMGLOB ) && suf[l] =='!') ||
|
||||||
( EFOutputFlags & EF_TRIMLOCAL ) && suf[l] == '#' )
|
(( EFOutputFlags & EF_TRIMLOCAL ) && suf[l] == '#') )
|
||||||
suf[l] = '\0' ;
|
suf[l] = '\0' ;
|
||||||
if ( esFormat == SU )
|
if ( esFormat == SU )
|
||||||
fprintf(outf, "S_");
|
fprintf(outf, "S_");
|
||||||
|
|
|
||||||
|
|
@ -1409,7 +1409,7 @@ spcnodeHierVisit(hc, node, res, cap)
|
||||||
hierName = (HierName *) node->efnode_name->efnn_hier;
|
hierName = (HierName *) node->efnode_name->efnn_hier;
|
||||||
nsn = nodeSpiceHierName(hc, hierName);
|
nsn = nodeSpiceHierName(hc, hierName);
|
||||||
|
|
||||||
if (esFormat == SPICE2 || esFormat == HSPICE && !strncmp(nsn, "z@", 2)) {
|
if (esFormat == SPICE2 || (esFormat == HSPICE && !strncmp(nsn, "z@", 2))) {
|
||||||
static char ntmp[MAX_STR_SIZE];
|
static char ntmp[MAX_STR_SIZE];
|
||||||
|
|
||||||
EFHNSprintf(ntmp, hierName);
|
EFHNSprintf(ntmp, hierName);
|
||||||
|
|
|
||||||
|
|
@ -169,8 +169,8 @@ esFormatSubs(outf, suf)
|
||||||
if (outf)
|
if (outf)
|
||||||
{
|
{
|
||||||
l = strlen(suf) - 1;
|
l = strlen(suf) - 1;
|
||||||
if ((EFOutputFlags & EF_TRIMGLOB ) && suf[l] == '!' ||
|
if (((EFOutputFlags & EF_TRIMGLOB ) && suf[l] == '!') ||
|
||||||
(EFOutputFlags & EF_TRIMLOCAL) && suf[l] == '#')
|
((EFOutputFlags & EF_TRIMLOCAL) && suf[l] == '#'))
|
||||||
suf[l] = '\0' ;
|
suf[l] = '\0' ;
|
||||||
if (EFOutputFlags & EF_CONVERTCOMMA)
|
if (EFOutputFlags & EF_CONVERTCOMMA)
|
||||||
while ((specchar = strchr(suf, ',')) != NULL)
|
while ((specchar = strchr(suf, ',')) != NULL)
|
||||||
|
|
@ -3652,7 +3652,7 @@ spcnodeVisit(node, res, cap)
|
||||||
hierName = (HierName *) node->efnode_name->efnn_hier;
|
hierName = (HierName *) node->efnode_name->efnn_hier;
|
||||||
nsn = nodeSpiceName(hierName, NULL);
|
nsn = nodeSpiceName(hierName, NULL);
|
||||||
|
|
||||||
if (esFormat == SPICE2 || esFormat == HSPICE && strncmp(nsn, "z@", 2)==0 ) {
|
if (esFormat == SPICE2 || (esFormat == HSPICE && strncmp(nsn, "z@", 2)==0 )) {
|
||||||
static char ntmp[MAX_STR_SIZE];
|
static char ntmp[MAX_STR_SIZE];
|
||||||
|
|
||||||
EFHNSprintf(ntmp, hierName);
|
EFHNSprintf(ntmp, hierName);
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@ void gcrPrintCol(ch, i, showResult)
|
||||||
}
|
}
|
||||||
else TxPrintf("#");
|
else TxPrintf("#");
|
||||||
}
|
}
|
||||||
else if ((res[i][j] & GCRU) || j != 0 && (res[i][j-1] & GCRU))
|
else if ((res[i][j] & GCRU) || (j != 0 && (res[i][j-1] & GCRU)))
|
||||||
{
|
{
|
||||||
if((res[i][j]&GCRCC) && (!(res[i][j]&(GCRBLKM|GCRBLKP))))
|
if((res[i][j]&GCRCC) && (!(res[i][j]&(GCRBLKM|GCRBLKP))))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -667,11 +667,11 @@ ResCalcNearDevice(tile, pendingList, doneList, resList)
|
||||||
/* 2. There are devices along two sides at right angles, */
|
/* 2. There are devices along two sides at right angles, */
|
||||||
/* and the tile is wider than it is tall. */
|
/* and the tile is wider than it is tall. */
|
||||||
|
|
||||||
if ((devedge & TOPEDGE) && (devedge & BOTTOMEDGE) &&
|
if (((devedge & TOPEDGE) && (devedge & BOTTOMEDGE) &&
|
||||||
!(devedge & LEFTEDGE) && !(devedge & RIGHTEDGE) ||
|
!(devedge & LEFTEDGE) && !(devedge & RIGHTEDGE)) ||
|
||||||
(devedge & TOPEDGE || devedge & BOTTOMEDGE) &&
|
((devedge & TOPEDGE || devedge & BOTTOMEDGE) &&
|
||||||
(devedge & LEFTEDGE || devedge & RIGHTEDGE) &&
|
(devedge & LEFTEDGE || devedge & RIGHTEDGE) &&
|
||||||
(RIGHT(tile) - LEFT(tile)) > (TOP(tile) - BOTTOM(tile)))
|
(RIGHT(tile) - LEFT(tile)) > (TOP(tile) - BOTTOM(tile))))
|
||||||
{
|
{
|
||||||
/* re-sort nodes south to north. */
|
/* re-sort nodes south to north. */
|
||||||
ResSortBreaks(&junk->breakList, FALSE);
|
ResSortBreaks(&junk->breakList, FALSE);
|
||||||
|
|
@ -939,8 +939,8 @@ ResSortBreaks(masterlist, xsort)
|
||||||
p3 = p2->br_next;
|
p3 = p2->br_next;
|
||||||
while (p3 != NULL)
|
while (p3 != NULL)
|
||||||
{
|
{
|
||||||
if (xsort == TRUE && p2->br_loc.p_x > p3->br_loc.p_x ||
|
if ((xsort == TRUE && p2->br_loc.p_x > p3->br_loc.p_x) ||
|
||||||
xsort == FALSE && p2->br_loc.p_y > p3->br_loc.p_y)
|
(xsort == FALSE && p2->br_loc.p_y > p3->br_loc.p_y))
|
||||||
{
|
{
|
||||||
changed = TRUE;
|
changed = TRUE;
|
||||||
if (p1 == NULL)
|
if (p1 == NULL)
|
||||||
|
|
|
||||||
|
|
@ -1033,9 +1033,9 @@ ResCheckSimNodes(celldef, resisdata)
|
||||||
ResFHFile = NULL;
|
ResFHFile = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ResExtFile == NULL && (ResOptionsFlags & ResOpt_DoExtFile)
|
if ((ResExtFile == NULL && (ResOptionsFlags & ResOpt_DoExtFile))
|
||||||
|| (ResOptionsFlags & ResOpt_DoLumpFile) && ResLumpFile == NULL
|
|| ((ResOptionsFlags & ResOpt_DoLumpFile) && ResLumpFile == NULL)
|
||||||
|| (ResOptionsFlags & ResOpt_FastHenry) && ResFHFile == NULL)
|
|| ((ResOptionsFlags & ResOpt_FastHenry) && ResFHFile == NULL))
|
||||||
{
|
{
|
||||||
TxError("Couldn't open output file\n");
|
TxError("Couldn't open output file\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -198,8 +198,8 @@ ResSimplifyNet(nodelist, biglist, reslist, tolerance)
|
||||||
* Break loop here. More than one driver indicates a loop;
|
* Break loop here. More than one driver indicates a loop;
|
||||||
* remove deadend, allowing drivers to be merged
|
* remove deadend, allowing drivers to be merged
|
||||||
*/
|
*/
|
||||||
else if (UnMarkedReceivers == 0 && (MarkedReceivers == 1 &&
|
else if (UnMarkedReceivers == 0 && ((MarkedReceivers == 1 &&
|
||||||
NumberOfDrivers > 1 || resistor2 != resistor1))
|
NumberOfDrivers > 1) || resistor2 != resistor1))
|
||||||
|
|
||||||
{
|
{
|
||||||
otherNode->rn_float.rn_area += resistor1->rr_float.rr_area;
|
otherNode->rn_float.rn_area += resistor1->rr_float.rr_area;
|
||||||
|
|
|
||||||
|
|
@ -320,8 +320,8 @@ selEnumPFunc2(tile, arg)
|
||||||
/* Also okay if the X over Y yields a stacking type whose residues */
|
/* Also okay if the X over Y yields a stacking type whose residues */
|
||||||
/* are X and Y. */
|
/* are X and Y. */
|
||||||
|
|
||||||
if ((ttype != seltype) && (((ttype == TT_SPACE) &&
|
if (((ttype != seltype) && (((ttype == TT_SPACE) &&
|
||||||
TTMaskHasType(&DBHomePlaneTypes[arg->sea_plane], seltype))) ||
|
TTMaskHasType(&DBHomePlaneTypes[arg->sea_plane], seltype)))) ||
|
||||||
(DBPaintResultTbl[arg->sea_plane][ttype][seltype] != seltype))
|
(DBPaintResultTbl[arg->sea_plane][ttype][seltype] != seltype))
|
||||||
{
|
{
|
||||||
TileType chktype = DBPaintResultTbl[arg->sea_plane][ttype][seltype];
|
TileType chktype = DBPaintResultTbl[arg->sea_plane][ttype][seltype];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue