Closed
Bug 756996
Opened 13 years ago
Closed 12 years ago
GCC warnings in gfx/2d
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: jacek, Assigned: jacek)
Details
Attachments
(1 file)
14.91 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
Unhandled enum value in switch statement is esp very noisy there. I've added defaults there, but probably in some cases default could be marked as unreachable. Other warnings were about static function was defained but not used (that's because they were in a headers and were not used by some header users; the fix requires marking them inline or moving to .cpp files). I've fixed also sign-compare warnings that seem safe in this case. The most useful seem to be unused variable warnings.
Attachment #625590 -
Flags: review?(bas.schouten)
Comment 1•12 years ago
|
||
Comment on attachment 625590 [details] [diff] [review]
fix v1.0
Review of attachment 625590 [details] [diff] [review]:
-----------------------------------------------------------------
Looks fine mostly.
::: gfx/2d/DrawTargetD2D.cpp
@@ +87,5 @@
>
> ID2D1Factory *DrawTargetD2D::mFactory;
> IDWriteFactory *DrawTargetD2D::mDWriteFactory;
>
> +static bool IsPatternSupportedByD2D(const Pattern &aPattern)
Let's make these inline and -not- move them into cpp files. I don't want to move them again when other files need this in the future.
Attachment #625590 -
Flags: review?(bas.schouten) → review+
Assignee | ||
Comment 2•12 years ago
|
||
I've moved them back and marked inline:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa3fe2aff1f5
Thanks for the review.
Target Milestone: --- → mozilla15
Comment 3•12 years ago
|
||
Backed out for compilation failures:
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=fe129d98513e
https://hg.mozilla.org/integration/mozilla-inbound/rev/7bcf7ead7392
Target Milestone: mozilla15 → ---
Assignee | ||
Comment 4•12 years ago
|
||
The failure was because MOZ_NOT_REACHED_MARKER is not present at all for GCC older than 4.5 in Assertion.h. I believe it's a bug (it should be at least defined as empty), but that's a separated issue. I've removed that part from my patch it builds on try:
https://tbpl.mozilla.org/?tree=Try&rev=1b14871c3acf
https://hg.mozilla.org/integration/mozilla-inbound/rev/50fa36a821fd
Target Milestone: --- → mozilla15
Comment 5•12 years ago
|
||
MOZ_ASSERT(false);
MOZ_NOT_REACHED_MARKER();
should just be
MOZ_NOT_REACHED("Why");
really
Assignee | ||
Comment 6•12 years ago
|
||
That would use MOZ_Assert instead of its macro version MOZ_ASSERT, which AFAIR is not desired in this code.
Updated•12 years ago
|
Target Milestone: mozilla15 → mozilla16
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•