Closed
Bug 1474878
Opened 7 years ago
Closed 7 years ago
Fix compile errors in Windows-only code after official builds switched to clang-cl in bug 1443590
Categories
(MailNews Core :: General, defect)
MailNews Core
General
Tracking
(thunderbird_esr6063+ fixed, thunderbird63 fixed)
RESOLVED
FIXED
Thunderbird 63.0
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
Details
Attachments
(1 file)
|
7.59 KB,
patch
|
aceman
:
review+
jorgk-bmo
:
approval-comm-esr60+
|
Details | Diff | Splinter Review |
There are compile errors in nsMessengerWinIntegration and nsAbOutlookDirectory (at least):
https://taskcluster-artifacts.net/WbGWHoDqQrSp25rIlJ1zXA/0/public/logs/live_backing.log
nsMessengerWinIntegration.cpp(289,35): error: non-constant-expression cannot be narrowed from type 'LONG' (aka 'long') to 'DWORD' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
nsAbOutlookDirectory.cpp(63,39): error: cannot pass object of non-trivial type 'nsCString' (aka 'nsTString<char>') through variadic function; call will abort at runtime [-Wnon-pod-varargs]
| Assignee | ||
Comment 1•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=623e5cfcc5de2930d01cec0cfd94d820bfa11be9
I can't tell whether this is right since vs2017 will compile just about anything ;-)
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•7 years ago
|
||
Looks like those two got fixed, but there are now some more :-(
nsWMSettings.cpp(697,55): error: cannot pass object of non-trivial type 'nsAutoString' (aka 'nsTAutoStringN<char16_t, 64>') through variadic function; call will abort at runtime [-Wnon-pod-varargs]
nsWMSettings.cpp(737,54): error: cannot pass object of non-trivial type 'nsAutoString' (aka 'nsTAutoStringN<char16_t, 64>') through variadic function; call will abort at runtime [-Wnon-pod-varargs]
rtfDecoder.cpp(467,9): error: no matching constructor for initialization of 'Lexem'
Another try:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=a88765b2dbf87593beba0d1440aed1fc4a0db9e3
We could be here for a while.
| Assignee | ||
Comment 3•7 years ago
|
||
More errors:
rtfDecoder.cpp(468,9): error: no viable overloaded '='
rtfDecoder.cpp(472,9): error: no viable overloaded '='
rtfDecoder.cpp(482,11): error: no viable overloaded '='
Let's see whether this fixed it:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=ae9fa3c25a7a58cf0b11f152253444e00cfae676
| Assignee | ||
Comment 4•7 years ago
|
||
The rtfDecoder.cpp is horrible. The assignment actually modifies the RHS :-(
https://dxr.mozilla.org/comm-central/rev/49a49e3bd9e5578c6744dacf372eb902746df6e6/mailnews/import/outlook/src/rtfDecoder.cpp#184
So the input value can't be 'const' and consequently something like
lexem = GetLexem(...);
fails since it would modify the function's return value on the heap. Yuk. As far as I can see, the function doesn't actually return the "bdata type which is modified when assigning, so there was never a problem at runtime. Hmm.
Since I didn't want to drill open the entire box, I modified GetLexem().
Let's see:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=985b77318b29f4e8850829a1941aae8af4ea5fff
| Assignee | ||
Comment 5•7 years ago
|
||
Judging by the time this has been compiling, we got past all the errors.
Attachment #8991465 -
Flags: review?(acelists)
| Assignee | ||
Comment 6•7 years ago
|
||
Well, that wasn't 100% right. The assignment operator is
Lexem& operator = (Lexem& from)
And that expects an l-value, and not a function invocation, like GetLexem(...).
Comment on attachment 8991465 [details] [diff] [review]
1474878-compile-errors.patch
Review of attachment 8991465 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks.
Attachment #8991465 -
Flags: review?(acelists) → review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/e7988ebfa0a8
fix compile errors found by clang-cl in Windows-only code. r=aceman
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•7 years ago
|
Target Milestone: --- → Thunderbird 63.0
Version: 60 → Trunk
| Assignee | ||
Comment 9•7 years ago
|
||
Comment on attachment 8991465 [details] [diff] [review]
1474878-compile-errors.patch
Let's consider this for uplift one day.
Attachment #8991465 -
Flags: approval-comm-esr60?
| Assignee | ||
Updated•7 years ago
|
Attachment #8991465 -
Flags: approval-comm-esr60? → approval-comm-esr60+
| Assignee | ||
Comment 10•7 years ago
|
||
status-thunderbird63:
--- → fixed
status-thunderbird_esr60:
--- → fixed
tracking-thunderbird_esr60:
--- → 63+
You need to log in
before you can comment on or make changes to this bug.
Description
•