Closed Bug 606070 Opened 14 years ago Closed 14 years ago

warning C4244: 'return' : conversion from 'const PRUint64' to 'PLDHashNumber' in nsHashKeys.h

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 7
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: RyanVM, Assigned: RyanVM)

References

Details

(Whiteboard: [build_warning])

Attachments

(1 file, 1 obsolete file)

nsHashKeys.h(187) : warning C4244: 'return' : conversion from 'const PRUint64' to 'PLDHashNumber', possible loss of data This gets spammed all over due to nsHashKeys.h being included in so many different files.
Bah. Want to add an explicit cast and I'll review?
{ return NS_PTR_TO_INT32(aKey); } seems to work. Should I be doing that or NS_PTR_TO_UINT32?
Attached patch Patch v1 (obsolete) — Splinter Review
Anyway, here's my patch. Let me know if I need to change it to UINT32 instead.
Assignee: nobody → ryanvm
Attachment #485207 - Flags: review?(bzbarsky)
Comment on attachment 485207 [details] [diff] [review] Patch v1 No, this is wrong. You're returning the pointer to the key, not the key itself. You just want to cast *aKey to PLDHashNumber.
Attachment #485207 - Flags: review?(bzbarsky) → review-
Sorry for not answering comment 2; I never got that bugmail. :(
Attached patch Patch v2Splinter Review
Attachment #485207 - Attachment is obsolete: true
Attachment #485501 - Flags: review?(bzbarsky)
Comment on attachment 485501 [details] [diff] [review] Patch v2 r=me
Attachment #485501 - Flags: review?(bzbarsky) → review+
Comment on attachment 485501 [details] [diff] [review] Patch v2 Trivial warning fix.
Attachment #485501 - Flags: approval2.0?
Attachment #485501 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: