From 23454440932c88d6aa3043ad99d28581e3016716 Mon Sep 17 00:00:00 2001 From: "scc%mozilla.org" Date: Tue, 6 Feb 2001 23:00:39 +0000 Subject: [PATCH] bug #66278: r=danm, sr=alecf. Fix signed vs. unsigned warngins in |nsFragmentedString::SetLength| --- string/src/nsFragmentedString.cpp | 4 ++-- xpcom/ds/nsFragmentedString.cpp | 4 ++-- xpcom/string/src/nsFragmentedString.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/string/src/nsFragmentedString.cpp b/string/src/nsFragmentedString.cpp index c8a7e04dcb83..42dd6aed379a 100755 --- a/string/src/nsFragmentedString.cpp +++ b/string/src/nsFragmentedString.cpp @@ -121,7 +121,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength ) // according to the current interpretation of |SetLength|, // cut off characters from the end, or else add unitialized space to fill - if ( aNewLength < mBufferList.GetDataLength() ) + if ( aNewLength < PRUint32(mBufferList.GetDataLength()) ) { // if ( aNewLength ) mBufferList.DiscardSuffix(mBufferList.GetDataLength()-aNewLength); @@ -130,7 +130,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength ) } // temporarily... eliminate as soon as our munging routines don't need this form of |SetLength| - else if ( aNewLength > mBufferList.GetDataLength() ) + else if ( aNewLength > PRUint32(mBufferList.GetDataLength()) ) { size_t empty_space_to_add = aNewLength - mBufferList.GetDataLength(); nsSharedBufferList::Buffer* new_buffer = nsSharedBufferList::NewSingleAllocationBuffer(0, 0, empty_space_to_add); diff --git a/xpcom/ds/nsFragmentedString.cpp b/xpcom/ds/nsFragmentedString.cpp index c8a7e04dcb83..42dd6aed379a 100755 --- a/xpcom/ds/nsFragmentedString.cpp +++ b/xpcom/ds/nsFragmentedString.cpp @@ -121,7 +121,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength ) // according to the current interpretation of |SetLength|, // cut off characters from the end, or else add unitialized space to fill - if ( aNewLength < mBufferList.GetDataLength() ) + if ( aNewLength < PRUint32(mBufferList.GetDataLength()) ) { // if ( aNewLength ) mBufferList.DiscardSuffix(mBufferList.GetDataLength()-aNewLength); @@ -130,7 +130,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength ) } // temporarily... eliminate as soon as our munging routines don't need this form of |SetLength| - else if ( aNewLength > mBufferList.GetDataLength() ) + else if ( aNewLength > PRUint32(mBufferList.GetDataLength()) ) { size_t empty_space_to_add = aNewLength - mBufferList.GetDataLength(); nsSharedBufferList::Buffer* new_buffer = nsSharedBufferList::NewSingleAllocationBuffer(0, 0, empty_space_to_add); diff --git a/xpcom/string/src/nsFragmentedString.cpp b/xpcom/string/src/nsFragmentedString.cpp index c8a7e04dcb83..42dd6aed379a 100755 --- a/xpcom/string/src/nsFragmentedString.cpp +++ b/xpcom/string/src/nsFragmentedString.cpp @@ -121,7 +121,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength ) // according to the current interpretation of |SetLength|, // cut off characters from the end, or else add unitialized space to fill - if ( aNewLength < mBufferList.GetDataLength() ) + if ( aNewLength < PRUint32(mBufferList.GetDataLength()) ) { // if ( aNewLength ) mBufferList.DiscardSuffix(mBufferList.GetDataLength()-aNewLength); @@ -130,7 +130,7 @@ nsFragmentedString::SetLength( PRUint32 aNewLength ) } // temporarily... eliminate as soon as our munging routines don't need this form of |SetLength| - else if ( aNewLength > mBufferList.GetDataLength() ) + else if ( aNewLength > PRUint32(mBufferList.GetDataLength()) ) { size_t empty_space_to_add = aNewLength - mBufferList.GetDataLength(); nsSharedBufferList::Buffer* new_buffer = nsSharedBufferList::NewSingleAllocationBuffer(0, 0, empty_space_to_add);