Closed
Bug 797666
Opened 12 years ago
Closed 12 years ago
Build warning: TiledLayerBuffer.h:368:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.36 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
{
Warning: -Wsign-compare in /mozilla/gfx/layers/TiledLayerBuffer.h: comparison between signed and unsigned integer expressions
/mozilla/gfx/layers/TiledLayerBuffer.h:368:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}
for this line:
> NS_ABORT_IF_FALSE(index >= 0 && index < newRetainedTiles.Length(), "index out of range");
I think we want to just cast index to unsigned before we compare it to .Length(). (We know it's safe to do that cast, because we've just checked that it's >= 0.)
Note that jdm posted a patch that includes a different fix for this over in bug 755031, but I don't think the strategy is right (making index unsigned), because index is set from a number of other signed variables. Also, that other bug seems to have gone silent, and this warning is bugging me, so I'm filing a one-off for just this particular warning.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #667784 -
Flags: review?(bgirard)
Updated•12 years ago
|
Attachment #667784 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 2•12 years ago
|
||
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Comment 3•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
•