Closed
Bug 1555436
Opened 6 years ago
Closed 6 years ago
Fix `readability-braces-around-statements` static analysis warnings for nsTextFrameUtils.* and nsTextRunTransformations.*
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla69
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: dholbert, Assigned: cmarlow)
Details
Attachments
(1 file)
Below are the warnings we get for this command:
./mach static-analysis check --checks "readability-braces-around-statements" layout/generic/nsTextFrameUtils.* layout/generic/nsTextRunTransformations.*
0:12.59 /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextFrameUtils.cpp
0:12.59 Warning: readability-braces-around-statements in /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextFrameUtils.cpp: statement should be inside braces
0:12.59 /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextFrameUtils.cpp:391:27: warning: statement should be inside braces [readability-braces-around-statements]
0:12.59 if (!mRemainingLength) return false;
0:12.59 ^
0:12.59 {
0:12.59 Warning: readability-braces-around-statements in /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextFrameUtils.h: statement should be inside braces
0:12.59 /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextFrameUtils.h:136:76: warning: statement should be inside braces [readability-braces-around-statements]
0:12.59 if (aArray->Length() > 0 && (*aArray)[aArray->Length() - 1] == aOffset)
0:12.59 ^
0:12.59 {
0:12.59 Warning: readability-braces-around-statements in /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextRunTransformations.cpp: statement should be inside braces
0:12.59 /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextRunTransformations.cpp:62:50: warning: statement should be inside braces [readability-braces-around-statements]
0:12.59 if (!mCapitalize.AppendElements(GetLength())) return;
0:12.59 ^
0:12.59 {
0:12.59 Warning: readability-braces-around-statements in /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextRunTransformations.cpp: statement should be inside braces
0:12.59 /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextRunTransformations.cpp:135:23: warning: statement should be inside braces [readability-braces-around-statements]
0:12.59 if (NS_FAILED(rv)) return;
0:12.59 ^
0:12.59 {
0:12.59 Warning: readability-braces-around-statements in /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextRunTransformations.cpp: statement should be inside braces
0:12.59 /scratch/work/builds/mozilla-central/mozilla/layout/generic/nsTextRunTransformations.cpp:828:14: warning: statement should be inside braces [readability-braces-around-statements]
0:12.59 if (!child) return;
0:12.59 ^
0:12.59 {
0:12.59
Reporter | ||
Comment 1•6 years ago
|
||
You can use me as code-reviewer here if you like.
Commit message could be something like:
Bug 1555436: Add braces to address static analysis warnings in some text layout code. r?dholbert
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/619e50e40760
Add braces to address static analysis warnings in some text layout code. r=dholbert
Keywords: checkin-needed
Comment 5•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox69:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in
before you can comment on or make changes to this bug.
Description
•