diff --git a/mozilla/base/src/nsBTree.cpp b/mozilla/base/src/nsBTree.cpp index bc09dcd655d..a771d94aaac 100644 --- a/mozilla/base/src/nsBTree.cpp +++ b/mozilla/base/src/nsBTree.cpp @@ -190,7 +190,7 @@ nsNode* nsBTree::Remove(nsNode& aNode){ if(node2!=node3) (*node3)==(*node2); - if(node2->mColor=nsNode::eBlack) + if(node2->mColor == nsNode::eBlack) ReBalance(*node1); delete node2; diff --git a/mozilla/base/src/nsBTree.h b/mozilla/base/src/nsBTree.h index 75743298d5f..62b79b8b654 100644 --- a/mozilla/base/src/nsBTree.h +++ b/mozilla/base/src/nsBTree.h @@ -279,4 +279,5 @@ protected: nsNode* mRoot; }; -#endif \ No newline at end of file +#endif + diff --git a/mozilla/base/src/nsRBTree.cpp b/mozilla/base/src/nsRBTree.cpp index ed2f0ad3bde..044a33abe34 100644 --- a/mozilla/base/src/nsRBTree.cpp +++ b/mozilla/base/src/nsRBTree.cpp @@ -321,12 +321,13 @@ nsBTree& nsRBTree::ReBalance(nsNode& aNode){ node2=node1->mParent->mRight; } - if((node2->mLeft->mColor=nsNode::eBlack) && (node2->mRight->mColor=nsNode::eBlack)) { + if((node2->mLeft->mColor == nsNode::eBlack) && + (node2->mRight->mColor == nsNode::eBlack)) { node2->mColor=nsNode::eRed; node1=node1->mParent; } else { - if(node2->mRight->mColor=nsNode::eBlack) { + if(node2->mRight->mColor == nsNode::eBlack) { node2->mLeft->mColor=nsNode::eBlack; node2->mColor=nsNode::eRed; ShiftRight(*node2); @@ -349,12 +350,13 @@ nsBTree& nsRBTree::ReBalance(nsNode& aNode){ node2=node1->mParent->mLeft; } - if((node2->mRight->mColor=nsNode::eBlack) && (node2->mLeft->mColor=nsNode::eBlack)) { + if((node2->mRight->mColor == nsNode::eBlack) && + (node2->mLeft->mColor == nsNode::eBlack)) { node2->mColor=nsNode::eRed; node1=node1->mParent; } else { - if(node2->mLeft->mColor=nsNode::eBlack){ + if(node2->mLeft->mColor == nsNode::eBlack){ node2->mRight->mColor=nsNode::eBlack; node2->mColor=nsNode::eRed; ShiftLeft(*node2); diff --git a/mozilla/base/src/nsRBTree.h b/mozilla/base/src/nsRBTree.h index 71423a3ee31..c91241b2bb3 100644 --- a/mozilla/base/src/nsRBTree.h +++ b/mozilla/base/src/nsRBTree.h @@ -220,4 +220,4 @@ protected: }; -#endif \ No newline at end of file +#endif diff --git a/mozilla/base/src/nsString.cpp b/mozilla/base/src/nsString.cpp index 8e45375800a..559280b9c0c 100644 --- a/mozilla/base/src/nsString.cpp +++ b/mozilla/base/src/nsString.cpp @@ -530,15 +530,15 @@ float nsString::ToFloat(PRInt32* aErrorCode) const { char buf[40]; if (mLength > sizeof(buf)-1) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return 0.0f; } char* cp = ToCString(buf, sizeof(buf)); float f = (float) PR_strtod(cp, &cp); if (*cp != 0) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; } - *aErrorCode = NS_OK; + *aErrorCode = (PRInt32) NS_OK; return f; } @@ -562,7 +562,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { cp++; } if (cp == end) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return rv; } @@ -572,7 +572,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { sign = *cp++; } if (cp == end) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return rv; } @@ -580,7 +580,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { while (cp < end) { PRUnichar ch = *cp++; if ((ch < '0') || (ch > '9')) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; break; } rv = rv * 10 + (ch - '0'); diff --git a/mozilla/gfx/src/nsTransform2D.cpp b/mozilla/gfx/src/nsTransform2D.cpp index 5670f7cc464..59633af4fac 100644 --- a/mozilla/gfx/src/nsTransform2D.cpp +++ b/mozilla/gfx/src/nsTransform2D.cpp @@ -214,7 +214,7 @@ void nsTransform2D :: Concatenate(nsTransform2D *newxform) void nsTransform2D :: PreConcatenate(nsTransform2D *newxform) { float temp00, temp01, temp10, temp11, temp20, temp21; - float new00, new01, new10, new11, new20, new21; + float new00, new01, new10, new11; //this is totally unoptimized MMP @@ -229,8 +229,6 @@ void nsTransform2D :: PreConcatenate(nsTransform2D *newxform) new01 = newxform->m01; new10 = newxform->m10; new11 = newxform->m11; - new20 = newxform->m20; - new21 = newxform->m21; m00 = temp00 * new00 + temp01 * new10; // + temp02 * new20 == 0 m01 = temp00 * new01 + temp01 * new11; // + temp02 * new21 == 0 diff --git a/mozilla/gfx/tests/TestColorNames.cpp b/mozilla/gfx/tests/TestColorNames.cpp index 3b439222635..e332c726e2e 100644 --- a/mozilla/gfx/tests/TestColorNames.cpp +++ b/mozilla/gfx/tests/TestColorNames.cpp @@ -109,5 +109,5 @@ int main(int argc, char** argv) } } - return 0; + return rv; } diff --git a/mozilla/htmlparser/src/CNavDTD.cpp b/mozilla/htmlparser/src/CNavDTD.cpp index d938687b6da..6e6c9c4c6c7 100644 --- a/mozilla/htmlparser/src/CNavDTD.cpp +++ b/mozilla/htmlparser/src/CNavDTD.cpp @@ -529,8 +529,6 @@ PRBool CNavDTD::CanContainIndirect(PRInt32 aParent,PRInt32 aChild) const { } break; - result=PR_TRUE; break; - default: break; } diff --git a/mozilla/htmlparser/src/COtherDTD.cpp b/mozilla/htmlparser/src/COtherDTD.cpp index fc5103ec05e..c9562d2ebd6 100644 --- a/mozilla/htmlparser/src/COtherDTD.cpp +++ b/mozilla/htmlparser/src/COtherDTD.cpp @@ -503,8 +503,6 @@ PRBool COtherDTD::CanContainIndirect(PRInt32 aParent,PRInt32 aChild) const { } break; - result=PR_TRUE; break; - default: break; } diff --git a/mozilla/parser/htmlparser/src/CNavDTD.cpp b/mozilla/parser/htmlparser/src/CNavDTD.cpp index d938687b6da..6e6c9c4c6c7 100644 --- a/mozilla/parser/htmlparser/src/CNavDTD.cpp +++ b/mozilla/parser/htmlparser/src/CNavDTD.cpp @@ -529,8 +529,6 @@ PRBool CNavDTD::CanContainIndirect(PRInt32 aParent,PRInt32 aChild) const { } break; - result=PR_TRUE; break; - default: break; } diff --git a/mozilla/parser/htmlparser/src/COtherDTD.cpp b/mozilla/parser/htmlparser/src/COtherDTD.cpp index fc5103ec05e..c9562d2ebd6 100644 --- a/mozilla/parser/htmlparser/src/COtherDTD.cpp +++ b/mozilla/parser/htmlparser/src/COtherDTD.cpp @@ -503,8 +503,6 @@ PRBool COtherDTD::CanContainIndirect(PRInt32 aParent,PRInt32 aChild) const { } break; - result=PR_TRUE; break; - default: break; } diff --git a/mozilla/string/obsolete/nsString.cpp b/mozilla/string/obsolete/nsString.cpp index 8e45375800a..559280b9c0c 100644 --- a/mozilla/string/obsolete/nsString.cpp +++ b/mozilla/string/obsolete/nsString.cpp @@ -530,15 +530,15 @@ float nsString::ToFloat(PRInt32* aErrorCode) const { char buf[40]; if (mLength > sizeof(buf)-1) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return 0.0f; } char* cp = ToCString(buf, sizeof(buf)); float f = (float) PR_strtod(cp, &cp); if (*cp != 0) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; } - *aErrorCode = NS_OK; + *aErrorCode = (PRInt32) NS_OK; return f; } @@ -562,7 +562,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { cp++; } if (cp == end) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return rv; } @@ -572,7 +572,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { sign = *cp++; } if (cp == end) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return rv; } @@ -580,7 +580,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { while (cp < end) { PRUnichar ch = *cp++; if ((ch < '0') || (ch > '9')) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; break; } rv = rv * 10 + (ch - '0'); diff --git a/mozilla/view/src/nsScrollingView.cpp b/mozilla/view/src/nsScrollingView.cpp index cd7c79709ec..acff384b0ae 100644 --- a/mozilla/view/src/nsScrollingView.cpp +++ b/mozilla/view/src/nsScrollingView.cpp @@ -422,4 +422,4 @@ void nsScrollingView :: ComputeScrollArea(nsIView *aView, nsRect &aRect, nsIView *view = aView->GetChild(cnt); ComputeScrollArea(view, aRect, aOffX, aOffY); } -} \ No newline at end of file +} diff --git a/mozilla/xpcom/ds/nsBTree.cpp b/mozilla/xpcom/ds/nsBTree.cpp index bc09dcd655d..a771d94aaac 100644 --- a/mozilla/xpcom/ds/nsBTree.cpp +++ b/mozilla/xpcom/ds/nsBTree.cpp @@ -190,7 +190,7 @@ nsNode* nsBTree::Remove(nsNode& aNode){ if(node2!=node3) (*node3)==(*node2); - if(node2->mColor=nsNode::eBlack) + if(node2->mColor == nsNode::eBlack) ReBalance(*node1); delete node2; diff --git a/mozilla/xpcom/ds/nsBTree.h b/mozilla/xpcom/ds/nsBTree.h index 75743298d5f..62b79b8b654 100644 --- a/mozilla/xpcom/ds/nsBTree.h +++ b/mozilla/xpcom/ds/nsBTree.h @@ -279,4 +279,5 @@ protected: nsNode* mRoot; }; -#endif \ No newline at end of file +#endif + diff --git a/mozilla/xpcom/ds/nsRBTree.cpp b/mozilla/xpcom/ds/nsRBTree.cpp index ed2f0ad3bde..044a33abe34 100644 --- a/mozilla/xpcom/ds/nsRBTree.cpp +++ b/mozilla/xpcom/ds/nsRBTree.cpp @@ -321,12 +321,13 @@ nsBTree& nsRBTree::ReBalance(nsNode& aNode){ node2=node1->mParent->mRight; } - if((node2->mLeft->mColor=nsNode::eBlack) && (node2->mRight->mColor=nsNode::eBlack)) { + if((node2->mLeft->mColor == nsNode::eBlack) && + (node2->mRight->mColor == nsNode::eBlack)) { node2->mColor=nsNode::eRed; node1=node1->mParent; } else { - if(node2->mRight->mColor=nsNode::eBlack) { + if(node2->mRight->mColor == nsNode::eBlack) { node2->mLeft->mColor=nsNode::eBlack; node2->mColor=nsNode::eRed; ShiftRight(*node2); @@ -349,12 +350,13 @@ nsBTree& nsRBTree::ReBalance(nsNode& aNode){ node2=node1->mParent->mLeft; } - if((node2->mRight->mColor=nsNode::eBlack) && (node2->mLeft->mColor=nsNode::eBlack)) { + if((node2->mRight->mColor == nsNode::eBlack) && + (node2->mLeft->mColor == nsNode::eBlack)) { node2->mColor=nsNode::eRed; node1=node1->mParent; } else { - if(node2->mLeft->mColor=nsNode::eBlack){ + if(node2->mLeft->mColor == nsNode::eBlack){ node2->mRight->mColor=nsNode::eBlack; node2->mColor=nsNode::eRed; ShiftLeft(*node2); diff --git a/mozilla/xpcom/ds/nsRBTree.h b/mozilla/xpcom/ds/nsRBTree.h index 71423a3ee31..c91241b2bb3 100644 --- a/mozilla/xpcom/ds/nsRBTree.h +++ b/mozilla/xpcom/ds/nsRBTree.h @@ -220,4 +220,4 @@ protected: }; -#endif \ No newline at end of file +#endif diff --git a/mozilla/xpcom/ds/nsString.cpp b/mozilla/xpcom/ds/nsString.cpp index 8e45375800a..559280b9c0c 100644 --- a/mozilla/xpcom/ds/nsString.cpp +++ b/mozilla/xpcom/ds/nsString.cpp @@ -530,15 +530,15 @@ float nsString::ToFloat(PRInt32* aErrorCode) const { char buf[40]; if (mLength > sizeof(buf)-1) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return 0.0f; } char* cp = ToCString(buf, sizeof(buf)); float f = (float) PR_strtod(cp, &cp); if (*cp != 0) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; } - *aErrorCode = NS_OK; + *aErrorCode = (PRInt32) NS_OK; return f; } @@ -562,7 +562,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { cp++; } if (cp == end) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return rv; } @@ -572,7 +572,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { sign = *cp++; } if (cp == end) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return rv; } @@ -580,7 +580,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { while (cp < end) { PRUnichar ch = *cp++; if ((ch < '0') || (ch > '9')) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; break; } rv = rv * 10 + (ch - '0'); diff --git a/mozilla/xpcom/string/obsolete/nsString.cpp b/mozilla/xpcom/string/obsolete/nsString.cpp index 8e45375800a..559280b9c0c 100644 --- a/mozilla/xpcom/string/obsolete/nsString.cpp +++ b/mozilla/xpcom/string/obsolete/nsString.cpp @@ -530,15 +530,15 @@ float nsString::ToFloat(PRInt32* aErrorCode) const { char buf[40]; if (mLength > sizeof(buf)-1) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return 0.0f; } char* cp = ToCString(buf, sizeof(buf)); float f = (float) PR_strtod(cp, &cp); if (*cp != 0) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; } - *aErrorCode = NS_OK; + *aErrorCode = (PRInt32) NS_OK; return f; } @@ -562,7 +562,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { cp++; } if (cp == end) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return rv; } @@ -572,7 +572,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { sign = *cp++; } if (cp == end) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; return rv; } @@ -580,7 +580,7 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode) const { while (cp < end) { PRUnichar ch = *cp++; if ((ch < '0') || (ch > '9')) { - *aErrorCode = NS_ERROR_ILLEGAL_VALUE; + *aErrorCode = (PRInt32) NS_ERROR_ILLEGAL_VALUE; break; } rv = rv * 10 + (ch - '0');