Closed Bug 860966 Opened 11 years ago Closed 11 years ago

Compile failure in msgMapiImp.cpp with Visual Studio 2012

Categories

(MailNews Core :: Simple MAPI, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 23.0

People

(Reporter: mcsmurf, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

When trying to compile SeaMonkey with Visual Studio 2012, the builds stops when trying to compile msgMapiImp.cpp because of those two errors:
http://hg.mozilla.org/comm-central/annotate/724e23e39c73/mailnews/mapi/mapihook/src/msgMapiImp.cpp#l339
Returning an nserror in a function with a LONG return type

and
http://hg.mozilla.org/comm-central/annotate/724e23e39c73/mailnews/mapi/mapihook/src/msgMapiImp.cpp#l385
Returning an nserror in a function with a HRESULT return type (says the compiler)
Previous versions of VC don't support strongly typed enums so they silently cast nsresult to LONG/HRESULT/whatever. Anyway, we shouldn't be returning NS_ERROR_FAILURE, we should be using Microsoft error codes.
Something like MAPI_E_FAILURE ?
Attached patch Patch (obsolete) — Splinter Review
This patch fixes the build, but still need to check if everything works as expected. I'm not sure what the meaning of the "// get the singelton obj" comment is in that context (when returning because of an error).
Attached patch PatchSplinter Review
This one is the correct patch, mixed up two patches there.
Attachment #736909 - Attachment is obsolete: true
Attachment #736914 - Flags: review?(mbanner)
Comment on attachment 736914 [details] [diff] [review]
Patch

Looks good to me.
Attachment #736914 - Flags: review?(mbanner) → review+
https://hg.mozilla.org/comm-central/rev/7ec742c695b8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 23.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: