Closed
Bug 575014
Opened 15 years ago
Closed 15 years ago
nsTArray::LastIndexOf triggers "warning C4244: 'return' : conversion from '__int64' to 'nsTArray_base::index_type', possible loss of data" on Win64
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(1 file)
970 bytes,
patch
|
timeless
:
review+
|
Details | Diff | Splinter Review |
My FAIL_ON_WARNINGS lading in bug 557566 comment 28 triggered a build failure on 64-bit Windows, due to this warning:
> nsDocLoader.cpp
> e:\builds\moz2_slave\mozilla-central-win64-debug-nightly\build\obj-firefox\dist\include\nsTArray.h(416) : error C2220: warning treated as error - no 'object' file generated
[...]
> e:\builds\moz2_slave\mozilla-central-win64-debug-nightly\build\obj-firefox\dist\include\nsTArray.h(416) : warning C4244: 'return' : conversion from '__int64' to 'nsTArray_base::index_type', possible loss of data
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1277595343.1277596686.26568.gz
I'd run the patch through TryServer, but I guess TryServer doesn't do Win64 (nor does normal tinderbox actually, except to generate a few Win64 nightlies per day.)
Fix coming up.
Assignee | ||
Comment 1•15 years ago
|
||
I think this should fix it.
Assignee | ||
Comment 2•15 years ago
|
||
(Ultimately we might want to make nsTArray::index_type be size_t, but for now, the type-casting is a more conservative fix.)
Attachment #454314 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 3•15 years ago
|
||
Landed patch with r=timeless and pending-review=bsmedberg, so that the bustage on Win64 nightlies will (hopefully) stop, and also since there's no other way for me to test this :-/ (No Win64 tryservers)
http://hg.mozilla.org/mozilla-central/rev/dc28988730e8
Assignee | ||
Comment 4•15 years ago
|
||
Nice, the next Win64 build (after this patch landed) was green:
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1277607223.1277613689.30944.gz
Assignee | ||
Comment 5•15 years ago
|
||
Resolving this as fixed -- had initially left this open with pending-r=bsmedberg, but timeless reviewed it, and it doesn't need another review.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•