Closed Bug 1257303 Opened 8 years ago Closed 8 years ago

accessible/windows/msaa/AccessibleWrap.cpp(1528): warning C4312: 'reinterpret_cast': conversion from 'const LONG' to 'void *' of greater size

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file, 1 obsolete file)

This warning is about to be unmasked in bug 1124033 and it gets turned into an error when building with Visual Studio 2015 Update 1 in automation.
As part of unblocking building with VS2015u1 in automation, I'm mass
disabling compiler warnings that are turned into errors. This is not
the preferred mechanism to fix compilation warnings. So hopefully
this patch never lands because someone insists on fixing the underlying
problem instead. But if it does land, hopefully the workaround is
only temporary.

Review commit: https://reviewboard.mozilla.org/r/40549/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/40549/
Comment on attachment 8731396 [details]
MozReview Request: Bug 1257303 - Disable C4312 to unblock compilation on VS2015; r?tbsaude

if I'm understanding the warning right its complaing about void* uniqueID = reinterpret_cast<void*>(<int variable>) which should be easily fixed by casting to uintptr_t before casting to void*.
Attachment #8731396 - Flags: review-
Without this, we get: C4312: 'reinterpret_cast': conversion from
'const LONG' to 'void *' of greater size

Review commit: https://reviewboard.mozilla.org/r/42111/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/42111/
Attachment #8734147 - Flags: review?(tbsaunde+mozbugs)
Attachment #8731396 - Attachment is obsolete: true
Assignee: nobody → gps
Status: NEW → ASSIGNED
Comment on attachment 8734147 [details]
MozReview Request: Bug 1257303 - Cast to intptr_t to avoid C4312 on VS2015; r?tbsaunde

tbsaunde reviewed over IRC.
Attachment #8734147 - Flags: review?(tbsaunde+mozbugs) → review+
https://hg.mozilla.org/mozilla-central/rev/ae01415f56b2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.