Skip to content

Commit ca74226

Browse files
author
Jianchun Xu
committed
linux: fix NumberUtilities_strtod warnings
Add parenthesises to && between ||
1 parent 7a30905 commit ca74226

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/Common/Common/NumberUtilities_strtod.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct BIGNUM
5757
void Round(ulong luExtra)
5858
{
5959
if (0 == (luExtra & 0x80000000) ||
60-
0 == (luExtra & 0x7FFFFFFF) && 0 == (m_lu0 & 1))
60+
(0 == (luExtra & 0x7FFFFFFF) && 0 == (m_lu0 & 1)))
6161
{
6262
if (luExtra)
6363
m_luError++;
@@ -856,7 +856,7 @@ static double AdjustDbl(double dbl, const EncodedChar *prgch, long cch, long lwE
856856
goto LFail;
857857

858858
wT = biDbl.Compare(&biDec);
859-
if (wT > 0 || 0 == wT && 0 != (Js::NumberUtilities::LuLoDbl(dbl) & 1))
859+
if (wT > 0 || (0 == wT && 0 != (Js::NumberUtilities::LuLoDbl(dbl) & 1)))
860860
{
861861
// Return the next lower value.
862862
if (!Js::NumberUtilities::AddLu(&Js::NumberUtilities::LuLoDbl(dbl), 0xFFFFFFFF))
@@ -876,7 +876,7 @@ static double AdjustDbl(double dbl, const EncodedChar *prgch, long cch, long lwE
876876
goto LFail;
877877

878878
wT = biDbl.Compare(&biDec);
879-
if (wT < 0 || 0 == wT && 0 != (Js::NumberUtilities::LuLoDbl(dbl) & 1))
879+
if (wT < 0 || (0 == wT && 0 != (Js::NumberUtilities::LuLoDbl(dbl) & 1)))
880880
{
881881
// Return the next higher value.
882882
if (Js::NumberUtilities::AddLu(&Js::NumberUtilities::LuLoDbl(dbl), 1))
@@ -1492,7 +1492,7 @@ static BOOL FDblToRgbPrecise(double dbl, __out_ecount(kcbMaxRgb) byte *prgb, int
14921492
}
14931493

14941494
// if (biNum < *pbiLo || biNum == *pbiLo && even)
1495-
if (w1 < 0 || 0 == w1 && 0 == (Js::NumberUtilities::LuLoDbl(dbl) & 1))
1495+
if (w1 < 0 || (0 == w1 && 0 == (Js::NumberUtilities::LuLoDbl(dbl) & 1)))
14961496
{
14971497
// if (biNum + biHi > biDen)
14981498
if (w2 > 0)
@@ -1501,7 +1501,7 @@ static BOOL FDblToRgbPrecise(double dbl, __out_ecount(kcbMaxRgb) byte *prgb, int
15011501
if (!biNum.FShiftLeft(1))
15021502
goto LFail;
15031503
w2 = biNum.Compare(&biDen);
1504-
if ((w2 > 0 || w2 == 0 && (bT & 1)) && bT++ == 9)
1504+
if ((w2 > 0 || (w2 == 0 && (bT & 1))) && bT++ == 9)
15051505
goto LRoundUp9;
15061506
}
15071507
Assert(ib < kcbMaxRgb);

0 commit comments

Comments
 (0)