Closed
Bug 1172238
Opened 10 years ago
Closed 9 years ago
OrientedImage.cpp: Arguments in wrong order
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
firefox41 | --- | affected |
People
(Reporter: Sylvestre, Assigned: dbryant, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: [CID 1286265])
For these two lines:
https://dxr.mozilla.org/mozilla-central/source/image/OrientedImage.cpp?from=OrientedImage.cpp&case=true#310
https://dxr.mozilla.org/mozilla-central/source/image/OrientedImage.cpp?from=OrientedImage.cpp&case=true#316
Coverity considers that this is incorrect:
swapped_arguments: The positions of arguments in the constructor for mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> do not match the ordering of the parameters:
innerImageSize.height is passed to aWidth
innerImageSize.width is passed to aHeight
I guess this is a not a big deal because we are probably doing a multiplication of the two arguments.
However, if the code evolves, this might cause some issues.
Comment 1•9 years ago
|
||
This is not a bug. The comment on line 310 explains that we are intentionally swapping the sizes here.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Reporter | ||
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•