Closed Bug 1256530 Opened 8 years ago Closed 8 years ago

parser\html\nsHtml5TreeBuilderCppSupplement.h(1006): warning C4312: 'type cast': conversion from 'unsigned int' to 'nsIContent *' of greater size

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: gps, Unassigned)

References

Details

Attachments

(1 file, 2 obsolete files)

This warning gets converted to 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/39959/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/39959/
Attachment #8730523 - Flags: review?(bugs)
Attached patch fix? (obsolete) — Splinter Review
Can you try this please?
Attachment #8730526 - Flags: feedback?(gps)
Comment on attachment 8730526 [details] [diff] [review]
fix?

Review of attachment 8730526 [details] [diff] [review]:
-----------------------------------------------------------------

The Try server was not amused (log from Windows 8 debug of https://treeherder.mozilla.org/#/jobs?repo=try&revision=ca407d173ab2):

 21:52:07     INFO -  Unified_cpp_parser_html0.cpp
 21:52:07     INFO -  c:/builds/moz2_slave/try-w64-d-00000000000000000000/build/src/parser/html/nsHtml5Highlighter.cpp(651): error C2220: warning treated as error - no 'object' file generated
 21:52:07     INFO -  Warning: C4312 in c:\builds\moz2_slave\try-w64-d-00000000000000000000\build\src\parser\html\nsHtml5Highlighter.cpp: 'reinterpret_cast': conversion from 'unsigned int' to 'nsIContent *' of greater size
 21:52:07     INFO -  c:/builds/moz2_slave/try-w64-d-00000000000000000000/build/src/parser/html/nsHtml5Highlighter.cpp(651): warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to 'nsIContent *' of greater size
 21:52:07     INFO -  Unified_cpp_parser_html1.cpp
 21:52:07     INFO -  c:\builds\moz2_slave\try-w64-d-00000000000000000000\build\src\parser\html\nsHtml5TreeBuilderCppSupplement.h(1006): error C2220: warning treated as error - no 'object' file generated
 21:52:07     INFO -  Warning: C4312 in c:\builds\moz2_slave\try-w64-d-00000000000000000000\build\src\parser\html\nsHtml5TreeBuilderCppSupplement.h: 'reinterpret_cast': conversion from 'unsigned int' to 'nsIContent *' of greater size
 21:52:07     INFO -  c:\builds\moz2_slave\try-w64-d-00000000000000000000\build\src\parser\html\nsHtml5TreeBuilderCppSupplement.h(1006): warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to 'nsIContent *' of greater size
 21:52:07     INFO -  c:/builds/moz2_slave/try-w64-d-00000000000000000000/build/src/config/rules.mk:930: recipe for target 'Unified_cpp_parser_html0.obj' failed
21:52:07 INFO - mozmake.EXE[5]: *** [Unified_cpp_parser_html0.obj] Error 2
Attachment #8730526 - Flags: feedback?(gps) → feedback-
Flags: needinfo?(hsivonen)
Comment on attachment 8730523 [details]
MozReview Request: Bug 1256530 - Disable C4312 to unblock compilation on VS2015; r?smaug

https://reviewboard.mozilla.org/r/39959/#review36561

rs+
Attachment #8730523 - Flags: review?(bugs) → review+
Attached patch fix?Splinter Review
How about this then?
Attachment #8730526 - Attachment is obsolete: true
Attachment #8730758 - Flags: feedback?(gps)
Comment on attachment 8730758 [details] [diff] [review]
fix?

Review of attachment 8730758 [details] [diff] [review]:
-----------------------------------------------------------------

I /think/ this passed Try. The failures on everything but win32 opt were due to other things.

I can do another Try push if you want to be sure.
Attachment #8730758 - Flags: feedback?(gps) → feedback+
Flags: needinfo?(hsivonen)
Attachment #8730758 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/2809e65fe155
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Attachment #8730523 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.