Closed
Bug 569608
Opened 14 years ago
Closed 14 years ago
gfxTextRunWordCache.cpp compilation failure on mingw-w64 due to pointer to long cast loosing precision.
Categories
(Core :: Graphics: Color Management, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jacek, Assigned: jacek)
References
Details
Attachments
(1 file, 1 obsolete file)
977 bytes,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
I get following error: gfx/thebes/src/gfxTextRunWordCache.cpp:938:57: error: cast from 'void*' to 'long int' loses precision long is 32-bit on win64, so it's really loosing precision. The attached patch changes cast to intptr_t instead of long.
Assignee | ||
Updated•14 years ago
|
Attachment #448766 -
Attachment is patch: true
Attachment #448766 -
Flags: review?(vladimir)
This should likely do a reinterpret_cast then; we really do want only the low 32 bits (as the hash key is only 32 bits), and I believe going up to 64 bits here will widen the whole expression for no good reason.
Assignee | ||
Comment 2•14 years ago
|
||
Thanks for review. I had an impression that in this case there will be implicit cast to 32-bit integer. reinterpret_cast alone doesn't fix the problem. The error remains. The attached patch uses two casts to make sure that we get 32-bit int. It could use reinterpret_cast if you prefer.
Assignee: nobody → jacek
Attachment #448766 -
Attachment is obsolete: true
Attachment #448766 -
Flags: review?(vladimir)
Assignee | ||
Updated•14 years ago
|
Attachment #448783 -
Flags: review?(vladimir)
Attachment #448783 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 3•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/63e1a2df087b
You need to log in
before you can comment on or make changes to this bug.
Description
•