Closed
Bug 679091
Opened 14 years ago
Closed 14 years ago
GCC 4.6 build warning: "gfxASurface.cpp:533:16: warning: variable ‘size’ set but not used [-Wunused-but-set-variable]"
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.02 KB,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
Build warning reported by GCC 4.6:
{
gfx/thebes/gfxASurface.cpp: In member function ‘void gfxASurface::FastMovePixels(const nsIntRect&, const nsIntPoint&)’:
gfx/thebes/gfxASurface.cpp:533:16: warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
}
Looks like this variable was unused in the patch that added it:
====
+void
+gfxASurface::MovePixels(const nsIntRect& aSourceRect,
+ const nsIntPoint& aDestTopLeft)
+{
+ gfxIntSize size = GetSize();
+ nsIntRect dest(aDestTopLeft, aSourceRect.Size());
+ // Assume that our cairo backend already knows how to properly
+ // self-copy. gfxASurface subtypes whose backend can't self-copy
+ // need their own implementations, or their backends need to be
+ // fixed.
+ nsRefPtr<gfxContext> ctx = new gfxContext(this);
+ ctx->SetOperator(gfxContext::OPERATOR_SOURCE);
+ nsIntPoint srcOrigin = dest.TopLeft() - aSourceRect.TopLeft();
+ ctx->SetSource(this, gfxPoint(srcOrigin.x, srcOrigin.y));
+ ctx->Rectangle(gfxRect(dest.x, dest.y, dest.width, dest.height));
+ ctx->Fill();
+}
https://hg.mozilla.org/mozilla-central/rev/173971a4af7e
====
Begone with you, unused variable!
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #553244 -
Flags: review?(jones.chris.g)
Updated•14 years ago
|
Attachment #553244 -
Flags: review?(jones.chris.g) → review+
Assignee | ||
Comment 2•14 years ago
|
||
Whiteboard: [inbound]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
Assignee | ||
Updated•13 years ago
|
Blocks: buildwarning
You need to log in
before you can comment on or make changes to this bug.
Description
•