Closed Bug 801472 Opened 13 years ago Closed 13 years ago

Build fails with C2440 on MSVC11

Categories

(Core :: XPCOM, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 801471

People

(Reporter: emk, Unassigned)

References

Details

Attachments

(1 file)

nsDataObj.cpp h:\m\mozilla-central\obj-i686-pc-mingw32\dist\include\nsError.h(135) : warning C4005: 'ERROR' : macro redefinition C:\Program Files (x86)\Windows Kits\8.0\include\um\wingdi.h(114) : see previous definition of 'ERROR' h:/m/mozilla-central/widget/windows/nsDataObj.cpp(315) : error C2440: 'return' : cannot convert from 'nsresult' to 'HRESULT'. conversion requires static_cast, C-style cast or function-style cast h:/m/mozilla-central/widget/windows/nsDataObj.cpp(1114) : error C2440: 'return' : cannot convert from 'nsresult' to 'HRESULT'. conversion requires static_cast, C-style cast or function-style cast h:/m/mozilla-central/widget/windows/nsDataObj.cpp(1117) : error C2440: 'return' : cannot convert from 'nsresult' to 'HRESULT'. conversion requires static_cast, C-style cast or function-style cast
Originally, nsresult was designed to keep compatibility with HRESULT. So I believe static_cast is safe here.
Attachment #671274 - Flags: review?(ayg)
Ooh, someone filed the same bug a bit earlier.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Attachment #671274 - Flags: review?(ayg)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: