Compile failure in msgMapiImp.cpp with Visual Studio 2012

RESOLVED FIXED in Thunderbird 23.0

Status

MailNews Core
Simple MAPI
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mcsmurf, Unassigned)

Tracking

Trunk
Thunderbird 23.0
x86_64
Windows 8

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
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)

Comment 1

4 years ago
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.

Comment 2

4 years ago
Something like MAPI_E_FAILURE ?
(Reporter)

Comment 3

4 years ago
Created attachment 736909 [details] [diff] [review]
Patch

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).
(Reporter)

Comment 4

4 years ago
Created attachment 736914 [details] [diff] [review]
Patch

This one is the correct patch, mixed up two patches there.
Attachment #736909 - Attachment is obsolete: true

Updated

4 years ago
Duplicate of this bug: 862652

Updated

4 years ago
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
Last Resolved: 4 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.