Last Comment Bug 860966 - Compile failure in msgMapiImp.cpp with Visual Studio 2012
: Compile failure in msgMapiImp.cpp with Visual Studio 2012
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Simple MAPI (show other bugs)
: Trunk
: x86_64 Windows 8
: -- normal (vote)
: Thunderbird 23.0
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
: 862652 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-11 15:43 PDT by Frank Wein [:mcsmurf]
Modified: 2013-04-17 18:45 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch (7.41 KB, patch)
2013-04-12 12:10 PDT, Frank Wein [:mcsmurf]
no flags Details | Diff | Splinter Review
Patch (1.08 KB, patch)
2013-04-12 12:15 PDT, Frank Wein [:mcsmurf]
standard8: review+
Details | Diff | Splinter Review

Description Frank Wein [:mcsmurf] 2013-04-11 15:43:23 PDT
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 neil@parkwaycc.co.uk 2013-04-11 16:39:16 PDT
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 :aceman 2013-04-11 23:56:51 PDT
Something like MAPI_E_FAILURE ?
Comment 3 Frank Wein [:mcsmurf] 2013-04-12 12:10:37 PDT
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).
Comment 4 Frank Wein [:mcsmurf] 2013-04-12 12:15:23 PDT
Created attachment 736914 [details] [diff] [review]
Patch

This one is the correct patch, mixed up two patches there.
Comment 5 Makoto Kato [:m_kato] 2013-04-16 20:33:04 PDT
*** Bug 862652 has been marked as a duplicate of this bug. ***
Comment 6 Mark Banner (:standard8) 2013-04-17 03:36:03 PDT
Comment on attachment 736914 [details] [diff] [review]
Patch

Looks good to me.
Comment 7 Makoto Kato [:m_kato] 2013-04-17 18:45:10 PDT
https://hg.mozilla.org/comm-central/rev/7ec742c695b8

Note You need to log in before you can comment on or make changes to this bug.