mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 414963 - "C++ warnings in jsnum.c, jsutil.c (with g++ -Wconversion)" [p=jorendorff@mozilla.com (Jason Orendorff) r+a1.9=brendan]
This commit is contained in:
parent
ffc995d036
commit
034ef625c9
@ -778,7 +778,7 @@ js_DoubleToECMAInt32(jsdouble d)
|
||||
|
||||
d = fmod(d, two32);
|
||||
d = (d >= 0) ? floor(d) : ceil(d) + two32;
|
||||
return (int32) (d >= two31) ? (d - two32) : d;
|
||||
return (int32) (d >= two31 ? d - two32 : d);
|
||||
}
|
||||
|
||||
JSBool
|
||||
@ -807,7 +807,7 @@ js_DoubleToECMAUint32(jsdouble d)
|
||||
|
||||
d = fmod(d, two32);
|
||||
|
||||
return (uint32) (d >= 0) ? d : d + two32;
|
||||
return (uint32) (d >= 0 ? d : d + two32);
|
||||
}
|
||||
|
||||
JSBool
|
||||
|
@ -198,7 +198,7 @@ JS_DumpHistogram(JSBasicStats *bs, FILE *fp)
|
||||
fprintf(fp, "%s %8u ", (bin == 10) ? "+" : ":", cnt);
|
||||
if (cnt != 0) {
|
||||
if (max > 1e6 && mean > 1e3)
|
||||
cnt = ceil(log10(cnt));
|
||||
cnt = (uint32) ceil(log10(cnt));
|
||||
else if (max > 16 && mean > 8)
|
||||
cnt = JS_CeilingLog2(cnt);
|
||||
for (i = 0; i < cnt; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user