Closed
Bug 799407
Opened 13 years ago
Closed 11 years ago
Fix build warnings in layout
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: dzbarsky, Assigned: dzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 1 obsolete file)
31.48 KB,
patch
|
roc
:
review+
dzbarsky
:
checkin+
|
Details | Diff | Splinter Review |
3.49 KB,
patch
|
roc
:
review+
dzbarsky
:
checkin+
|
Details | Diff | Splinter Review |
2.24 KB,
patch
|
roc
:
review+
dzbarsky
:
checkin+
|
Details | Diff | Splinter Review |
4.84 KB,
patch
|
roc
:
review+
dzbarsky
:
checkin+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #669420 -
Flags: review?(roc)
Comment on attachment 669420 [details] [diff] [review]
Patch
Review of attachment 669420 [details] [diff] [review]:
-----------------------------------------------------------------
Cool!
::: layout/base/nsCSSRendering.cpp
@@ +1899,5 @@
> appUnitsPerPixel));
> }
>
> // Compute gradient shape: the x and y radii of an ellipse.
> + double radiusX = 0, radiusY = 0;
How about initializing radiusX and radiusY in the default case of the switch statement so if we forget to initialize in some case, we still get a warning?
::: layout/generic/nsBlockFrame.cpp
@@ +1559,3 @@
> NS_STYLE_DIRECTION_LTR == aDirection) ||
> (NS_STYLE_TEXT_ALIGN_END == aAlignment &&
> NS_STYLE_DIRECTION_RTL == aDirection)) &&
Fix indent
::: layout/generic/nsViewportFrame.cpp
@@ +236,5 @@
> // to reflect the available space for the fixed items
> nsHTMLReflowState reflowState(aReflowState);
> +#ifdef DEBUG
> + nsPoint offset =
> +#endif
DebugOnly<> doesn't work here?
Assignee | ||
Comment 2•13 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #1)
>
> ::: layout/generic/nsViewportFrame.cpp
> @@ +236,5 @@
> > // to reflect the available space for the fixed items
> > nsHTMLReflowState reflowState(aReflowState);
> > +#ifdef DEBUG
> > + nsPoint offset =
> > +#endif
>
> DebugOnly<> doesn't work here?
No, probably because DebugOnly doesn't define |operator.|
Assignee | ||
Comment 3•13 years ago
|
||
Fixed the nits.
Attachment #669420 -
Attachment is obsolete: true
Attachment #669420 -
Flags: review?(roc)
Attachment #669856 -
Flags: review?(roc)
Attachment #669856 -
Flags: review?(roc) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Leaving open for gcc warnings.
https://hg.mozilla.org/integration/mozilla-inbound/rev/53edf545ee94
Whiteboard: [leave open]
Assignee | ||
Updated•13 years ago
|
Attachment #669856 -
Flags: checkin+
Comment 5•13 years ago
|
||
Updated•13 years ago
|
Blocks: buildwarning
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #670575 -
Flags: review?(roc)
Attachment #670575 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #670575 -
Flags: checkin+
Assignee | ||
Comment 8•13 years ago
|
||
Backed out because more warnings have been added.
https://hg.mozilla.org/integration/mozilla-inbound/rev/ce995fa8292c
Comment 9•13 years ago
|
||
Comment on attachment 670575 [details] [diff] [review]
Fix warnings in layout/generic
>diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp
>--- a/layout/generic/nsTextFrameThebes.cpp
>+++ b/layout/generic/nsTextFrameThebes.cpp
>- nscolor overrideColor;
>+ nscolor overrideColor = nscolor(0);
Drive-by nit: this probably wants to be NS_RGBA(0,0,0,0), not nscolor(0). (They evaluate to the same thing, but the RGBA form is more human-readable and makes fewer assumptions about the underlying representation of nscolor).
Note that we don't have any instances of "nscolor(0)" in the codebase right now:
https://mxr.mozilla.org/mozilla-central/search?string=nscolor%280%29
but we do have ~50 each of NS_RGB(0,0,0) and NS_RGBA(0,0,0,0)
https://mxr.mozilla.org/mozilla-central/search?string=NS_RGB%280%2C
https://mxr.mozilla.org/mozilla-central/search?string=NS_RGBA%280%2C
Assignee | ||
Comment 10•13 years ago
|
||
I pushed the warning fixes but didn't enable FAIL_ON_WARNINGS.
https://hg.mozilla.org/integration/mozilla-inbound/rev/78022080a795
Assignee | ||
Comment 11•13 years ago
|
||
Attachment #671284 -
Flags: review?(roc)
Attachment #671284 -
Flags: review?(roc) → review+
Assignee | ||
Comment 12•13 years ago
|
||
Pushed the layout/generic patch:
https://hg.mozilla.org/integration/mozilla-inbound/rev/97bda7166b3a
Assignee | ||
Updated•13 years ago
|
Attachment #671284 -
Flags: checkin+
Assignee | ||
Comment 13•13 years ago
|
||
Attachment #671302 -
Flags: review?(roc)
Attachment #671302 -
Flags: review?(roc) → review+
Assignee | ||
Updated•13 years ago
|
Attachment #671302 -
Flags: checkin+
Assignee | ||
Comment 14•13 years ago
|
||
Assignee | ||
Comment 15•13 years ago
|
||
Assignee | ||
Comment 16•13 years ago
|
||
Comment 17•13 years ago
|
||
![]() |
||
Comment 19•11 years ago
|
||
Can this bug be closed now? It seems all the patches have landed, and that this bug isn't being used as meta bug.
Flags: needinfo?(dzbarsky)
Assignee | ||
Comment 20•11 years ago
|
||
Yep.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(dzbarsky)
Resolution: --- → FIXED
Whiteboard: [leave open]
Updated•11 years ago
|
Target Milestone: --- → mozilla19
You need to log in
before you can comment on or make changes to this bug.
Description
•