Closed Bug 1613256 Opened 2 months ago Closed 2 months ago

VariableLengthPrefixSet.cpp: redundant return statement at the end of a function with a void return type

Categories

(Firefox Build System :: Source Code Analysis, task)

task
Not set

Tracking

(firefox75 fixed)

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: Sylvestre, Assigned: samuelzeter, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=C++])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1613255 +++

Filling as a good first bug to learn workflows.

return; at the end of a void function is useless
https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp#48

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-redundant-control-flow.html

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html

I'm a newbie and would like to get to know the workflow. Could I take this bug?

Sure, just propose a patch :)

Assignee: nobody → samuelzeter
Status: NEW → ASSIGNED
Attachment #9125366 - Attachment description: Bug 1613256 - Remove redundant return statement r=sg → Bug 1613256 - Refactor EnsureSorted to use std::isSorted r=sg

If I'm looking at helping out in the future, is the process to express interest on the bug page and then submit a patch (like what I have done) in order to avoid two people submitting the same fix? Or are patches submitted, more commonly, without expressions of interest?

Samuel, that's great to hear :)

It makes sense to assign the bug to yourself once you start working on it. In your case, it got automatically assigned to you once you submitted the patch. That's also fine, but indeed increases the risk you mentioned :) With more complex bugs, it makes sense to assign it to yourself and first discuss what you plan to do by commenting on the bug.

Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd65ac107627
Refactor EnsureSorted to use std::isSorted  r=sg
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.