Bug 1173908 - Fix an MSVC warning about negating an unsigned integer; r=nbp

This commit is contained in:
Terrence Cole 2015-06-04 12:43:10 -07:00
parent 1c724eebe8
commit a692de4097
2 changed files with 5 additions and 3 deletions

View File

@ -28,8 +28,9 @@ MacroAssembler::setFramePushed(uint32_t framePushed)
}
void
MacroAssembler::adjustFrame(int value)
MacroAssembler::adjustFrame(int32_t value)
{
MOZ_ASSERT_IF(value < 0, framePushed_ >= -value);
setFramePushed(framePushed_ + value);
}
@ -37,7 +38,8 @@ void
MacroAssembler::implicitPop(uint32_t bytes)
{
MOZ_ASSERT(bytes % sizeof(intptr_t) == 0);
adjustFrame(-bytes);
MOZ_ASSERT(bytes <= INT32_MAX);
adjustFrame(-int32_t(bytes));
}
// ===============================================================

View File

@ -280,7 +280,7 @@ class MacroAssembler : public MacroAssemblerSpecific
inline uint32_t framePushed() const;
inline void setFramePushed(uint32_t framePushed);
inline void adjustFrame(int value);
inline void adjustFrame(int32_t value);
// Adjust the frame, to account for implicit modification of the stack
// pointer, such that callee can remove arguments on the behalf of the