Closed
Bug 679091
Opened 13 years ago
Closed 13 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•13 years ago
|
||
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #553244 -
Flags: review?(jones.chris.g)
Updated•13 years ago
|
Attachment #553244 -
Flags: review?(jones.chris.g) → review+
Assignee | ||
Comment 2•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/4d9fe0a94ba2
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/4d9fe0a94ba2
Status: ASSIGNED → RESOLVED
Closed: 13 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
•