mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
removed unsightly warnings from string classes
This commit is contained in:
parent
badee6de22
commit
0ab7547cf9
@ -57,7 +57,7 @@ inline PRUnichar GetCharAt(const char* aString,PRUint32 anIndex) {
|
||||
*/
|
||||
void ShiftCharsLeft(char* aDest,PRUint32 aLength,PRUint32 anOffset,PRUint32 aCount) {
|
||||
PRUint32 theMax=aLength-anOffset;
|
||||
PRUint32 theLength=(theMax<aCount) ? theMax : aCount;
|
||||
// PRUint32 theLength=(theMax<aCount) ? theMax : aCount;
|
||||
|
||||
char* first= aDest+anOffset+aCount;
|
||||
char* last = aDest+aLength;
|
||||
@ -102,7 +102,7 @@ void ShiftCharsRight(char* aDest,PRUint32 aLength,PRUint32 anOffset,PRUint32 aCo
|
||||
*/
|
||||
void ShiftDoubleCharsLeft(char* aDest,PRUint32 aLength,PRUint32 anOffset,PRUint32 aCount) {
|
||||
PRUint32 theMax=aLength-anOffset;
|
||||
PRUint32 theLength=(theMax<aCount) ? theMax : aCount;
|
||||
// PRUint32 theLength=(theMax<aCount) ? theMax : aCount;
|
||||
|
||||
PRUnichar* theBuf=(PRUnichar*)aDest;
|
||||
PRUnichar* first= theBuf+anOffset+aCount;
|
||||
@ -549,7 +549,7 @@ CaseConverters gCaseConverters[]={&ConvertCase1,&ConvertCase2};
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 StripChars1(char* aString,PRUint32 anOffset,PRUint32 aCount,const char* aSet){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
typedef char chartype;
|
||||
chartype* from = (chartype*)&aString[anOffset];
|
||||
@ -581,7 +581,7 @@ PRInt32 StripChars1(char* aString,PRUint32 anOffset,PRUint32 aCount,const char*
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 StripChars2(char* aString,PRUint32 anOffset,PRUint32 aCount,const char* aSet){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
typedef PRUnichar chartype;
|
||||
chartype* from = (chartype*)&aString[anOffset];
|
||||
@ -622,7 +622,7 @@ StripChars gStripChars[]={&StripChars1,&StripChars2};
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 TrimChars1(char* aString,PRUint32 aLength,const char* aSet,PRBool aEliminateLeading,PRBool aEliminateTrailing){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
typedef char chartype;
|
||||
chartype* from = (chartype*)aString;
|
||||
@ -745,7 +745,7 @@ TrimChars gTrimChars[]={&TrimChars1,&TrimChars2};
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 CompressChars1(char* aString,PRUint32 aLength,const char* aSet,PRUint32 aChar,PRBool aEliminateLeading,PRBool aEliminateTrailing){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
TrimChars1(aString,aLength,aSet,aEliminateLeading,aEliminateTrailing);
|
||||
|
||||
@ -791,7 +791,7 @@ PRInt32 CompressChars1(char* aString,PRUint32 aLength,const char* aSet,PRUint32
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 CompressChars2(char* aString,PRUint32 aLength,const char* aSet,PRUint32 aChar,PRBool aEliminateLeading,PRBool aEliminateTrailing){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
TrimChars2(aString,aLength,aSet,aEliminateLeading,aEliminateTrailing);
|
||||
|
||||
|
@ -124,7 +124,7 @@ HandleCaseConversionShutdown2::OnShutdown(const nsCID& cid, nsISupports* service
|
||||
{
|
||||
if (cid.Equals(kUnicharUtilCID)) {
|
||||
NS_ASSERTION(service == gCaseConv, "wrong service!");
|
||||
nsrefcnt cnt = gCaseConv->Release();
|
||||
gCaseConv->Release();
|
||||
gCaseConv = NULL;
|
||||
}
|
||||
return NS_OK;
|
||||
@ -742,7 +742,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
||||
PRUnichar* cp = (-1==decPt) ? mStr + mLength-1 : mStr+decPt-1;
|
||||
char digit=0;
|
||||
PRUnichar theChar;
|
||||
PRInt32 theShift=0;
|
||||
// PRInt32 theShift=0;
|
||||
PRInt32 theMult=1;
|
||||
|
||||
*aErrorCode = (0<mLength) ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -120,7 +120,7 @@ HandleCaseConversionShutdown3::OnShutdown(const nsCID& cid, nsISupports* service
|
||||
{
|
||||
if (cid.Equals(kUnicharUtilCID)) {
|
||||
NS_ASSERTION(service == gCaseConv, "wrong service!");
|
||||
nsrefcnt cnt = gCaseConv->Release();
|
||||
gCaseConv->Release();
|
||||
gCaseConv = NULL;
|
||||
}
|
||||
return NS_OK;
|
||||
@ -284,7 +284,7 @@ void nsString2::SetCapacity(PRUint32 aLength) {
|
||||
*********************************************************************/
|
||||
|
||||
|
||||
static char gChar=0;
|
||||
//static char gChar=0;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -668,7 +668,7 @@ PRInt32 nsString2::ToInteger(PRInt32* anErrorCode,PRUint32 aRadix) const {
|
||||
char* cp = (kNotFound==decPt) ? theString.mStr.mCharBuf + theString.mLength-1 : theString.mStr.mCharBuf+decPt-1;
|
||||
char digit=0;
|
||||
char theChar;
|
||||
PRInt32 theShift=0;
|
||||
// PRInt32 theShift=0;
|
||||
PRInt32 theMult=1;
|
||||
|
||||
*anErrorCode = (0<theString.mLength) ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -124,7 +124,7 @@ HandleCaseConversionShutdown2::OnShutdown(const nsCID& cid, nsISupports* service
|
||||
{
|
||||
if (cid.Equals(kUnicharUtilCID)) {
|
||||
NS_ASSERTION(service == gCaseConv, "wrong service!");
|
||||
nsrefcnt cnt = gCaseConv->Release();
|
||||
gCaseConv->Release();
|
||||
gCaseConv = NULL;
|
||||
}
|
||||
return NS_OK;
|
||||
@ -742,7 +742,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
||||
PRUnichar* cp = (-1==decPt) ? mStr + mLength-1 : mStr+decPt-1;
|
||||
char digit=0;
|
||||
PRUnichar theChar;
|
||||
PRInt32 theShift=0;
|
||||
// PRInt32 theShift=0;
|
||||
PRInt32 theMult=1;
|
||||
|
||||
*aErrorCode = (0<mLength) ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -120,7 +120,7 @@ HandleCaseConversionShutdown3::OnShutdown(const nsCID& cid, nsISupports* service
|
||||
{
|
||||
if (cid.Equals(kUnicharUtilCID)) {
|
||||
NS_ASSERTION(service == gCaseConv, "wrong service!");
|
||||
nsrefcnt cnt = gCaseConv->Release();
|
||||
gCaseConv->Release();
|
||||
gCaseConv = NULL;
|
||||
}
|
||||
return NS_OK;
|
||||
@ -284,7 +284,7 @@ void nsString2::SetCapacity(PRUint32 aLength) {
|
||||
*********************************************************************/
|
||||
|
||||
|
||||
static char gChar=0;
|
||||
//static char gChar=0;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -668,7 +668,7 @@ PRInt32 nsString2::ToInteger(PRInt32* anErrorCode,PRUint32 aRadix) const {
|
||||
char* cp = (kNotFound==decPt) ? theString.mStr.mCharBuf + theString.mLength-1 : theString.mStr.mCharBuf+decPt-1;
|
||||
char digit=0;
|
||||
char theChar;
|
||||
PRInt32 theShift=0;
|
||||
// PRInt32 theShift=0;
|
||||
PRInt32 theMult=1;
|
||||
|
||||
*anErrorCode = (0<theString.mLength) ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -57,7 +57,7 @@ inline PRUnichar GetCharAt(const char* aString,PRUint32 anIndex) {
|
||||
*/
|
||||
void ShiftCharsLeft(char* aDest,PRUint32 aLength,PRUint32 anOffset,PRUint32 aCount) {
|
||||
PRUint32 theMax=aLength-anOffset;
|
||||
PRUint32 theLength=(theMax<aCount) ? theMax : aCount;
|
||||
// PRUint32 theLength=(theMax<aCount) ? theMax : aCount;
|
||||
|
||||
char* first= aDest+anOffset+aCount;
|
||||
char* last = aDest+aLength;
|
||||
@ -102,7 +102,7 @@ void ShiftCharsRight(char* aDest,PRUint32 aLength,PRUint32 anOffset,PRUint32 aCo
|
||||
*/
|
||||
void ShiftDoubleCharsLeft(char* aDest,PRUint32 aLength,PRUint32 anOffset,PRUint32 aCount) {
|
||||
PRUint32 theMax=aLength-anOffset;
|
||||
PRUint32 theLength=(theMax<aCount) ? theMax : aCount;
|
||||
// PRUint32 theLength=(theMax<aCount) ? theMax : aCount;
|
||||
|
||||
PRUnichar* theBuf=(PRUnichar*)aDest;
|
||||
PRUnichar* first= theBuf+anOffset+aCount;
|
||||
@ -549,7 +549,7 @@ CaseConverters gCaseConverters[]={&ConvertCase1,&ConvertCase2};
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 StripChars1(char* aString,PRUint32 anOffset,PRUint32 aCount,const char* aSet){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
typedef char chartype;
|
||||
chartype* from = (chartype*)&aString[anOffset];
|
||||
@ -581,7 +581,7 @@ PRInt32 StripChars1(char* aString,PRUint32 anOffset,PRUint32 aCount,const char*
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 StripChars2(char* aString,PRUint32 anOffset,PRUint32 aCount,const char* aSet){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
typedef PRUnichar chartype;
|
||||
chartype* from = (chartype*)&aString[anOffset];
|
||||
@ -622,7 +622,7 @@ StripChars gStripChars[]={&StripChars1,&StripChars2};
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 TrimChars1(char* aString,PRUint32 aLength,const char* aSet,PRBool aEliminateLeading,PRBool aEliminateTrailing){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
typedef char chartype;
|
||||
chartype* from = (chartype*)aString;
|
||||
@ -745,7 +745,7 @@ TrimChars gTrimChars[]={&TrimChars1,&TrimChars2};
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 CompressChars1(char* aString,PRUint32 aLength,const char* aSet,PRUint32 aChar,PRBool aEliminateLeading,PRBool aEliminateTrailing){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
TrimChars1(aString,aLength,aSet,aEliminateLeading,aEliminateTrailing);
|
||||
|
||||
@ -791,7 +791,7 @@ PRInt32 CompressChars1(char* aString,PRUint32 aLength,const char* aSet,PRUint32
|
||||
* @return the new length of the given buffer
|
||||
*/
|
||||
PRInt32 CompressChars2(char* aString,PRUint32 aLength,const char* aSet,PRUint32 aChar,PRBool aEliminateLeading,PRBool aEliminateTrailing){
|
||||
PRInt32 result=0;
|
||||
// PRInt32 result=0;
|
||||
|
||||
TrimChars2(aString,aLength,aSet,aEliminateLeading,aEliminateTrailing);
|
||||
|
||||
|
@ -124,7 +124,7 @@ HandleCaseConversionShutdown2::OnShutdown(const nsCID& cid, nsISupports* service
|
||||
{
|
||||
if (cid.Equals(kUnicharUtilCID)) {
|
||||
NS_ASSERTION(service == gCaseConv, "wrong service!");
|
||||
nsrefcnt cnt = gCaseConv->Release();
|
||||
gCaseConv->Release();
|
||||
gCaseConv = NULL;
|
||||
}
|
||||
return NS_OK;
|
||||
@ -742,7 +742,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
||||
PRUnichar* cp = (-1==decPt) ? mStr + mLength-1 : mStr+decPt-1;
|
||||
char digit=0;
|
||||
PRUnichar theChar;
|
||||
PRInt32 theShift=0;
|
||||
// PRInt32 theShift=0;
|
||||
PRInt32 theMult=1;
|
||||
|
||||
*aErrorCode = (0<mLength) ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -120,7 +120,7 @@ HandleCaseConversionShutdown3::OnShutdown(const nsCID& cid, nsISupports* service
|
||||
{
|
||||
if (cid.Equals(kUnicharUtilCID)) {
|
||||
NS_ASSERTION(service == gCaseConv, "wrong service!");
|
||||
nsrefcnt cnt = gCaseConv->Release();
|
||||
gCaseConv->Release();
|
||||
gCaseConv = NULL;
|
||||
}
|
||||
return NS_OK;
|
||||
@ -284,7 +284,7 @@ void nsString2::SetCapacity(PRUint32 aLength) {
|
||||
*********************************************************************/
|
||||
|
||||
|
||||
static char gChar=0;
|
||||
//static char gChar=0;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -668,7 +668,7 @@ PRInt32 nsString2::ToInteger(PRInt32* anErrorCode,PRUint32 aRadix) const {
|
||||
char* cp = (kNotFound==decPt) ? theString.mStr.mCharBuf + theString.mLength-1 : theString.mStr.mCharBuf+decPt-1;
|
||||
char digit=0;
|
||||
char theChar;
|
||||
PRInt32 theShift=0;
|
||||
// PRInt32 theShift=0;
|
||||
PRInt32 theMult=1;
|
||||
|
||||
*anErrorCode = (0<theString.mLength) ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -124,7 +124,7 @@ HandleCaseConversionShutdown2::OnShutdown(const nsCID& cid, nsISupports* service
|
||||
{
|
||||
if (cid.Equals(kUnicharUtilCID)) {
|
||||
NS_ASSERTION(service == gCaseConv, "wrong service!");
|
||||
nsrefcnt cnt = gCaseConv->Release();
|
||||
gCaseConv->Release();
|
||||
gCaseConv = NULL;
|
||||
}
|
||||
return NS_OK;
|
||||
@ -742,7 +742,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
||||
PRUnichar* cp = (-1==decPt) ? mStr + mLength-1 : mStr+decPt-1;
|
||||
char digit=0;
|
||||
PRUnichar theChar;
|
||||
PRInt32 theShift=0;
|
||||
// PRInt32 theShift=0;
|
||||
PRInt32 theMult=1;
|
||||
|
||||
*aErrorCode = (0<mLength) ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -120,7 +120,7 @@ HandleCaseConversionShutdown3::OnShutdown(const nsCID& cid, nsISupports* service
|
||||
{
|
||||
if (cid.Equals(kUnicharUtilCID)) {
|
||||
NS_ASSERTION(service == gCaseConv, "wrong service!");
|
||||
nsrefcnt cnt = gCaseConv->Release();
|
||||
gCaseConv->Release();
|
||||
gCaseConv = NULL;
|
||||
}
|
||||
return NS_OK;
|
||||
@ -284,7 +284,7 @@ void nsString2::SetCapacity(PRUint32 aLength) {
|
||||
*********************************************************************/
|
||||
|
||||
|
||||
static char gChar=0;
|
||||
//static char gChar=0;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -668,7 +668,7 @@ PRInt32 nsString2::ToInteger(PRInt32* anErrorCode,PRUint32 aRadix) const {
|
||||
char* cp = (kNotFound==decPt) ? theString.mStr.mCharBuf + theString.mLength-1 : theString.mStr.mCharBuf+decPt-1;
|
||||
char digit=0;
|
||||
char theChar;
|
||||
PRInt32 theShift=0;
|
||||
// PRInt32 theShift=0;
|
||||
PRInt32 theMult=1;
|
||||
|
||||
*anErrorCode = (0<theString.mLength) ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
|
Loading…
Reference in New Issue
Block a user