nsChromeRegistry.cpp: do not use 'else' after 'return'
Categories
(Core :: General, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: baka)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=C++])
Attachments
(1 file, 2 obsolete files)
(deleted),
text/x-phabricator-request
|
Details |
Filling as a good first bug to learn workflows.
do not use 'else' after 'return':
https://searchfox.org/mozilla-central/source/dom/base/ContentIterator.cpp#267-269
As the change is trivial, it is just to learn how to contribute to Firefox.
Found by http://clang.llvm.org/extra/clang-tidy/checks/readability-else-after-return.html
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D93873
Comment 4•4 years ago
|
||
bugherder |
Comment 5•4 years ago
|
||
Comment 6•4 years ago
|
||
It seems the patch from akshat.dixit71 actually fixed Bug 1669834 (nsChromeRegistry.cpp) rather than this Bug 1669833 (ContentIterator.cpp). Should this one be reopened?
I just submitted a patch for ContentIterator.cpp, which is my first contribution! I also found Bug 1658273 suggesting that this specific case may be incorrectly flagged as a problem. However, there are also other cases of [readability-else-after-return] in the same file which are not as debatable, so I decided to still submit the patch.
Comment 7•4 years ago
|
||
(In reply to Rafal Bielski from comment #6)
It seems the patch from akshat.dixit71 actually fixed Bug 1669834 (nsChromeRegistry.cpp) rather than this Bug 1669833 (ContentIterator.cpp). Should this one be reopened?
I think it would make the most sense to file a new bug for ContentIterator, and attach your patch to that bug. Thanks.
Comment 9•4 years ago
|
||
I'll rename this bug to mention what actually ended up being fixed here.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 10•4 years ago
|
||
I just went ahead and filed bug 1673913. You can attach your patch there, please. Thanks.
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Comment on attachment 9182829 [details]
Bug 1669833 - Fix readability-else-after-return warnings. r?masayuki
Revision D94243 was moved to bug 1673913. Setting attachment 9182829 [details] to obsolete.
Comment 12•4 years ago
|
||
Thank you Andrew, I moved the patch to Bug 1673913
Updated•4 years ago
|
Description
•