pldhash.cpp fails to compile on mingw-w64

RESOLVED FIXED in mozilla9

Status

()

Core
XPCOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Jacek Caban, Assigned: Jacek Caban)

Tracking

Trunk
mozilla9
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 554820 [details] [diff] [review]
fix v1.0

There is void* to unsigned long cast that is losing precision on win64 (because long is 32-bits). It's an error by default in GCC. The code already does two-step casting (for other 64-bit platforms that have 64-bit long), so just using proper type is enough for the fix.
Attachment #554820 - Flags: review?(mh+mozilla)
Comment on attachment 554820 [details] [diff] [review]
fix v1.0

Review of attachment 554820 [details] [diff] [review]:
-----------------------------------------------------------------

I don't know if we want to add a use of a NSPR type. Note that in bug 569821, the same was done to jsdhash.cpp, using uintptr_t.
Attachment #554820 - Flags: review?(mh+mozilla) → review?(benjamin)
(Assignee)

Comment 2

6 years ago
Thanks for the review. pldhash.cpp is already full of NSPR types, so it seems a good choice for me. I can change it if desired.
Attachment #554820 - Flags: review?(benjamin) → review+
(Assignee)

Comment 3

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/5011676ea479
Whiteboard: [inbound]
(In reply to Jacek Caban from comment #3)
> http://hg.mozilla.org/integration/mozilla-inbound/rev/5011676ea479

landed on m-c
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.