Closed
Bug 1417995
Opened 8 years ago
Closed 8 years ago
Fix compile warning in mailnews/addrbook/src/nsAbOutlookDirectory.cpp(36)
Categories
(MailNews Core :: Address Book, defect)
MailNews Core
Address Book
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 59.0
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
Details
Attachments
(2 files)
|
1.10 KB,
patch
|
aceman
:
review+
|
Details | Diff | Splinter Review |
|
2.27 KB,
patch
|
aceman
:
review+
|
Details | Diff | Splinter Review |
c:/builds/moz2_slave/tb-c-cen-w64-ntly-000000000000/build/mailnews/addrbook/src/nsAbOutlookDirectory.cpp(36): error C2220: warning treated as error - no 'object' file generated
c:/builds/moz2_slave/tb-c-cen-w64-ntly-000000000000/build/mailnews/addrbook/src/nsAbOutlookDirectory.cpp(36): warning C5038: data member 'nsAbOutlookDirectory::mAbWinType' will be initialized after data member 'nsAbOutlookDirectory::mMapiData'
| Assignee | ||
Comment 1•8 years ago
|
||
Not sure that fixes the problem, but worth a try. I don't see why that needs to be initialised at all since there's an assignment later on.
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/ed175fca802f
Fix compile warning in nsAbOutlookDirectory.cpp. rs=bustage-fix
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 3•8 years ago
|
||
If I read this correctly, the patch should fix the issue:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/2553854-c-compiler-should-warn-about-wrong-member-initia
Target Milestone: --- → Thunderbird 59.0
| Assignee | ||
Comment 4•8 years ago
|
||
Oops, there are more:
mailnews/import/outlook/src/nsOutlookMail.cpp(342)
mailnews/addrbook/src/nsAbWinHelper.cpp(243)
I'll see whether I can see them locally before doing another push. Sadly no Win64 on try :-(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 5•8 years ago
|
||
That should cover everything.
Attachment #8929093 -
Flags: review?(acelists)
Comment on attachment 8929067 [details] [diff] [review]
1417995-compile-warning.patch
Review of attachment 8929067 [details] [diff] [review]:
-----------------------------------------------------------------
With the patches already landed, I compile OK on Linux.
Attachment #8929067 -
Flags: review?(acelists) → review+
| Assignee | ||
Comment 7•8 years ago
|
||
Patches? Plural? That's a double joke then. Only one patch has landed and the code is Windows only :-)
Yes, I noticed now:) I have now pushed the other one to try.
I wonder why these cases still remained as I remember in the past we got errors from the incorrect order of member initialization.
Ah, you said there is no win64 on try, which we need to test this :(
| Assignee | ||
Comment 10•8 years ago
|
||
I took the liberty to cancel that try run. No need to compile Windows-only code on Mac and Linux, and no need to look for an VS2017 compiler warning when compiling 32bit using VS2015 :-(
I'll land this with my next push since the first patch fixed one issue, so I have no doubt that the other patch will fix more issues.
> I wonder why these cases still remained as I remember in the past we got
> errors from the incorrect order of member initialization.
Indeed. This warning arrived in VS2017 as per the article quoted in comment #3.
Comment 11•8 years ago
|
||
Yes I mean gcc and probably clang warned about this long ago so we cleaned it up in most files.
But I see now all the files you are probably compiled on Windows only so that is why they weren't already detected by gcc/clang on Linux/OS X.
Attachment #8929093 -
Flags: review?(acelists) → review+
Comment 12•8 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/2807eb6d3c02
More: Fix compile warning in nsOutlookMail.cpp and nsAbWinHelper.cpp. r=aceman
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•