Bug 562592 - comparison between signed and unsigned integer expressions in nsCommandLine, r=roc

This commit is contained in:
timeless@mozdev.org 2010-04-29 00:14:00 -07:00
parent 3d4a604266
commit e210bb59d7

View File

@ -129,7 +129,7 @@ NS_IMETHODIMP
nsCommandLine::GetArgument(PRInt32 aIndex, nsAString& aResult)
{
NS_ENSURE_ARG_MIN(aIndex, 0);
NS_ENSURE_ARG_MAX(aIndex, mArgs.Length());
NS_ENSURE_ARG_MAX(PRUint32(aIndex), mArgs.Length());
aResult = mArgs[aIndex];
return NS_OK;
@ -165,7 +165,7 @@ NS_IMETHODIMP
nsCommandLine::RemoveArguments(PRInt32 aStart, PRInt32 aEnd)
{
NS_ENSURE_ARG_MIN(aStart, 0);
NS_ENSURE_ARG_MAX(aEnd + 1, mArgs.Length());
NS_ENSURE_ARG_MAX(PRUint32(aEnd) + 1, mArgs.Length());
for (PRInt32 i = aEnd; i >= aStart; --i) {
mArgs.RemoveElementAt(i);