Closed Bug 1160784 Opened 6 years ago Closed 6 years ago

Misleading declaration

Categories

(Core :: Layout, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

Details

(Keywords: clang-analyzer)

Attachments

(1 file)

Found by scan-build
https://people.mozilla.org/~sledru/reports/fx-scan-build/report-nsBlockFrame.cpp-ReflowBlockFrame-60-1.html#EndPath

The declaration " treatWithClearance = true;" is confusing because it has no effect as the function returns a few lines after.

See:
https://dxr.mozilla.org/mozilla-central/source/layout/generic/nsBlockFrame.cpp?from=nsBlockFrame.cpp#3155
Attachment #8600607 - Flags: review?(smontagu)
Comment on attachment 8600607 [details] [diff] [review]
remove-confusing-declaration.diff

Review of attachment 8600607 [details] [diff] [review]:
-----------------------------------------------------------------

Makes sense
Attachment #8600607 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/d9eec87368ce
Assignee: nobody → sledru
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.