Closed Bug 661517 Opened 14 years ago Closed 14 years ago

nsWebSocketHandler.cpp fails to compile on mingw-w64

Categories

(Core :: Networking: WebSockets, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jacek, Assigned: jacek)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch fix v1.0 (obsolete) — Splinter Review
mozilla-central/netwerk/protocol/websocket/nsWebSocketHandler.cpp:966:36: error: cast from 'PRUint8*' to 'long unsigned int' loses precision [-fpermissive] That's because long is 32-bit on win64. In this case we don't care about losing precision, but it's still an error for GCC. The fix is as simple as using uintptr_t.
Attachment #536870 - Flags: review?(Olli.Pettay)
Could you cast to some PRU*** type?
Comment on attachment 536870 [details] [diff] [review] fix v1.0 Or, uintptr_t could be ok, but this is Patrick's code
Attachment #536870 - Flags: review?(Olli.Pettay) → review?(mcmanus)
The attached patch uses PRUptrdiff instead of uintptr_t. Please choose preferred version.
Attachment #537132 - Flags: review?
Comment on attachment 536870 [details] [diff] [review] fix v1.0 Review of attachment 536870 [details] [diff] [review]: ----------------------------------------------------------------- Jacek, what do you think about using PRUptrdiff ? There are a number of places in the code base (netwerk is not one of them) that go to some length to make sure uintptr_t is defined for old platforms.
Attachment #537132 - Flags: review? → review+
Attachment #536870 - Flags: review?(mcmanus)
(In reply to comment #3) > Created attachment 537132 [details] [diff] [review] [review] > fix using PRUptrdiff > > The attached patch uses PRUptrdiff instead of uintptr_t. Please choose > preferred version. heh - race condition. good to go.
Attachment #536870 - Attachment is obsolete: true
Thanks for the review, pushed to m-c: http://hg.mozilla.org/mozilla-central/rev/780fb17abc1e
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: