Closed Bug 1257303 Opened 5 years ago Closed 4 years ago
Wrap .cpp(1528): warning C4312: 'reinterpret _cast': conversion from 'const LONG' to 'void *' of greater size
58 bytes, text/x-review-board-request
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
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+
You need to log in before you can comment on or make changes to this bug.