Closed Bug 1392057 Opened 3 years ago Closed 3 years ago

Port bug |Bug 1389851 - Fix and enable clang's -Wunreachable-code-return warnings| to Thunderbird

Categories

(Thunderbird :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 57.0

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

Details

Attachments

(4 files, 5 obsolete files)

So far, two warnings turned into errors:
morkRowSpace.cpp:242:10: error: 'return' will never be executed
nsVCard.cpp:1170:12: error: 'return' will never be executed

Can be seen on try.

Patch coming.
Better comment.
Assignee: nobody → jorgk
Attachment #8899227 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Sadly there was more. In nsMessenger.cpp I fixed the twisted logic by flattening the if/else blocks. The changes look terrible but nothing really happened.

https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=f553f587b6e58ac7e8d11b9046b59ca35b840245
Attachment #8899229 - Attachment is obsolete: true
Attached patch no-white.patchSplinter Review
Patch without whitespace changes for easier review if anyone cares. Produced with
  hg qdiff -w > no-white.patch
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/c2a027de14ed
Port bug 1389851: Fix clang's -Wunreachable-code-return warnings. rs=bustage-fix
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
That finally compiled, however, builds are currently orange due to mismatched build files.
Target Milestone: --- → Thunderbird 57.0
Follow-ip: Clean-up of whitespace in nsVCard.cpp. Terrible.
Attached patch no-white2.patch (obsolete) — Splinter Review
Here's the no-whitespace equivalent.
Attached patch no-white2.patchSplinter Review
Attachment #8899253 - Attachment is obsolete: true
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/d6c62fa41ae2
Follow-up: Fix whitespace issues in nsVCard.cpp. rs=whitespace-only DONTBUILD
Thanks.
Attachment #8899243 - Flags: review+
Attachment #8899254 - Flags: review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/19bea9a55bfb
Follow-up (take 2): Fix whitespace issues in nsVCard.cpp. rs=whitespace-only DONTBUILD
You need to log in before you can comment on or make changes to this bug.