mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
Bug 829369: Cast pointer-subtraction to a size_t (after ensuring it'll be nonnegative) when comparing it to a nsTArray's size, to fix signed/unsigned comparison build warning. r=dbaron
This commit is contained in:
parent
99f8c4d6a6
commit
a86f8f4b14
@ -285,9 +285,10 @@ ElementAnimations::EnsureStyleRuleFor(TimeStamp aRefreshTime,
|
||||
}
|
||||
NS_ABORT_IF_FALSE(segment->mFromKey < segment->mToKey,
|
||||
"incorrect keys");
|
||||
NS_ABORT_IF_FALSE(segment - prop.mSegments.Elements() <
|
||||
NS_ABORT_IF_FALSE(segment >= prop.mSegments.Elements() &&
|
||||
size_t(segment - prop.mSegments.Elements()) <
|
||||
prop.mSegments.Length(),
|
||||
"ran off end");
|
||||
"out of array bounds");
|
||||
|
||||
if (!mStyleRule) {
|
||||
// Allocate the style rule now that we know we have animation data.
|
||||
|
Loading…
Reference in New Issue
Block a user