Closed Bug 1600554 Opened 11 months ago Closed 11 months ago

Remove a nested redundant #if

Categories

(Firefox Build System :: Lint and Formatting, task, P3)

task

Tracking

(firefox73 fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: Sylvestre, Assigned: dawiha79, Mentored)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file, 1 obsolete file)

Filling as a good first bug to learn workflows.

MOZ_WIDGET_GTK is checked twice and we are in the same block
https://searchfox.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#2702

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-preprocessor.html

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

Hi, I would like to assign to this bug.

Please submit a patch, i will assign once you have done it

This is a patch for https://searchfox.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp .

The check for "if defined(MOZ_WIDGET_GTK)" at line 3744 is redundant because that is checked at line 3729 also which is the parent "if".

Differences:
(Old) Line 3744: # if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11)
(New) Line 3744: # if defined(MOZ_X11)

man.god96, please follow the documentation mentioned in comment #0
We don't use bugzilla for development

Attachment #9113557 - Attachment is obsolete: true
Assignee: nobody → dawiha79
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39b62e08daa0
Removed nested redundant #if r=froydnj
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.