Closed
Bug 791801
Opened 12 years ago
Closed 12 years ago
In constructor ‘mozilla::gfx::AlphaBoxBlur::AlphaBoxBlur... ‘mozilla::gfx::AlphaBoxBlur::mStride’ will be initialized after...‘mozilla::gfx::IntRect mozilla::gfx::AlphaBoxBlur::mRect’...Blur.cpp:388:1: warning: when initialized here [-Wreorder
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
ajones
:
review+
|
Details | Diff | Splinter Review |
Newish build warning:
{
In file included from ../../../mozilla/gfx/2d/Blur.cpp:5:0:
../../dist/include/mozilla/gfx/Blur.h: In constructor ‘mozilla::gfx::AlphaBoxBlur::AlphaBoxBlur(uint8_t*, const mozilla::gfx::Rect&, int32_t, float)’:
../../dist/include/mozilla/gfx/Blur.h:153:11: warning: ‘mozilla::gfx::AlphaBoxBlur::mStride’ will be initialized after [-Wreorder]
../../dist/include/mozilla/gfx/Blur.h:122:11: warning: ‘mozilla::gfx::IntRect mozilla::gfx::AlphaBoxBlur::mRect’ [-Wreorder]
../../../mozilla/gfx/2d/Blur.cpp:388:1: warning: when initialized here [-Wreorder]
}
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #661882 -
Flags: review?
Assignee | ||
Updated•12 years ago
|
Attachment #661882 -
Flags: review? → review?(ajones)
Assignee | ||
Comment 2•12 years ago
|
||
The patch just moves mRect to be first in the init list (before mSpreadRadius), to match the ordering in the .h file:
http://mxr.mozilla.org/mozilla-central/source/gfx/2d/Blur.h#119
I verified that this compiles & fixes the build warning locally for me.
Updated•12 years ago
|
Attachment #661882 -
Flags: review?(ajones) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Assignee | ||
Comment 4•12 years ago
|
||
Note: The line that this shifted...
> mRect(aRect.x, aRect.y, aRect.width, aRect.height)
...looks a bit suspicious -- it's initializing an IntRect from a Rect.
So, aRect.x, aRect.y, etc. are all float-valued, and we're copying them to integers.
That's potentially-bogus... Anthony, shouldn't we need range-checks and/or NS_Round() calls there? (If so, I'm happy to file a separate bug on that, or feel free to do so yourself)
Comment 5•12 years ago
|
||
This is called only from DrawTargetCairo::DrawSurfaceWithShadow() where the values can only be ints. It would make sense to change it to an IntRect or even IntSize.
Comment 6•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•