diff --git a/mozilla/content/base/src/nsGenericElement.cpp b/mozilla/content/base/src/nsGenericElement.cpp
index 93c3b7fdce8..ae58ee16d15 100644
--- a/mozilla/content/base/src/nsGenericElement.cpp
+++ b/mozilla/content/base/src/nsGenericElement.cpp
@@ -1276,12 +1276,12 @@ nsGenericElement::AddScriptEventListener(nsIAtom* aAttribute,
else {
nsIEventListenerManager *manager;
if (NS_OK == GetListenerManager(&manager)) {
- nsIScriptObjectOwner* owner;
+ nsIScriptObjectOwner* cowner;
if (NS_OK == mContent->QueryInterface(kIScriptObjectOwnerIID,
- (void**) &owner)) {
- ret = manager->AddScriptEventListener(context, owner,
+ (void**) &cowner)) {
+ ret = manager->AddScriptEventListener(context, cowner,
aAttribute, aValue, aIID);
- NS_RELEASE(owner);
+ NS_RELEASE(cowner);
}
NS_RELEASE(manager);
}
diff --git a/mozilla/content/base/src/nsTextFragment.cpp b/mozilla/content/base/src/nsTextFragment.cpp
index a01515899f8..e9adc87defd 100644
--- a/mozilla/content/base/src/nsTextFragment.cpp
+++ b/mozilla/content/base/src/nsTextFragment.cpp
@@ -118,10 +118,10 @@ nsTextFragment::SetTo(const PRUnichar* aBuffer, PRInt32 aLength)
if (0 != aLength) {
// See if we need to store the data in ucs2 or not
PRBool need2 = PR_FALSE;
- const PRUnichar* cp = aBuffer;
- const PRUnichar* end = aBuffer + aLength;
- while (cp < end) {
- PRUnichar ch = *cp++;
+ const PRUnichar* ucp = aBuffer;
+ const PRUnichar* uend = aBuffer + aLength;
+ while (ucp < uend) {
+ PRUnichar ch = *ucp++;
if (ch >> 8) {
need2 = PR_TRUE;
break;
diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp
index f32ba268758..cb94c96bfd3 100644
--- a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp
@@ -2410,7 +2410,7 @@ nsGenericHTMLContainerElement::ReplaceChild(nsIDOMNode* aNewChild,
IndexOf(content, pos);
if (pos >= 0) {
nsIContent* newContent = nsnull;
- nsresult res = aNewChild->QueryInterface(kIContentIID, (void**)&newContent);
+ res = aNewChild->QueryInterface(kIContentIID, (void**)&newContent);
NS_ASSERTION(NS_OK == res, "Must be an nsIContent");
if (NS_OK == res) {
// Check if this is a document fragment. If it is, we need
diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp
index 9fcbbe0c9f9..afa66e1fddf 100644
--- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp
+++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp
@@ -1069,8 +1069,8 @@ CSSStyleSheetImpl::CSSStyleSheetImpl()
mDocument(nsnull),
mOwningNode(nsnull),
mDisabled(PR_FALSE),
- mScriptObject(nsnull),
- mDirty(PR_FALSE)
+ mDirty(PR_FALSE),
+ mScriptObject(nsnull)
{
NS_INIT_REFCNT();
nsCSSAtoms::AddrefAtoms();
@@ -1095,9 +1095,9 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(const CSSStyleSheetImpl& aCopy)
mDocument(aCopy.mDocument),
mOwningNode(aCopy.mOwningNode),
mDisabled(aCopy.mDisabled),
+ mDirty(PR_FALSE),
mScriptObject(nsnull),
- mInner(aCopy.mInner),
- mDirty(PR_FALSE)
+ mInner(aCopy.mInner)
{
NS_INIT_REFCNT();
nsCSSAtoms::AddrefAtoms();
diff --git a/mozilla/content/shared/src/nsTextFragment.cpp b/mozilla/content/shared/src/nsTextFragment.cpp
index a01515899f8..e9adc87defd 100644
--- a/mozilla/content/shared/src/nsTextFragment.cpp
+++ b/mozilla/content/shared/src/nsTextFragment.cpp
@@ -118,10 +118,10 @@ nsTextFragment::SetTo(const PRUnichar* aBuffer, PRInt32 aLength)
if (0 != aLength) {
// See if we need to store the data in ucs2 or not
PRBool need2 = PR_FALSE;
- const PRUnichar* cp = aBuffer;
- const PRUnichar* end = aBuffer + aLength;
- while (cp < end) {
- PRUnichar ch = *cp++;
+ const PRUnichar* ucp = aBuffer;
+ const PRUnichar* uend = aBuffer + aLength;
+ while (ucp < uend) {
+ PRUnichar ch = *ucp++;
if (ch >> 8) {
need2 = PR_TRUE;
break;
diff --git a/mozilla/htmlparser/src/nsLoggingSink.cpp b/mozilla/htmlparser/src/nsLoggingSink.cpp
index d33c88275a4..9749e605dc0 100644
--- a/mozilla/htmlparser/src/nsLoggingSink.cpp
+++ b/mozilla/htmlparser/src/nsLoggingSink.cpp
@@ -455,8 +455,6 @@ nsLoggingSink::WriteAttributes(const nsIParserNode& aNode)
if (0 != strchr(gSkippedContentTags, aNode.GetNodeType())) {
const nsString& content = aNode.GetSkippedContent();
if (content.Length() > 0) {
- nsAutoString tmp;
-
QuoteText(content, tmp);
(*mOutput) << " " << endl;
diff --git a/mozilla/layout/base/src/nsGenericElement.cpp b/mozilla/layout/base/src/nsGenericElement.cpp
index 93c3b7fdce8..ae58ee16d15 100644
--- a/mozilla/layout/base/src/nsGenericElement.cpp
+++ b/mozilla/layout/base/src/nsGenericElement.cpp
@@ -1276,12 +1276,12 @@ nsGenericElement::AddScriptEventListener(nsIAtom* aAttribute,
else {
nsIEventListenerManager *manager;
if (NS_OK == GetListenerManager(&manager)) {
- nsIScriptObjectOwner* owner;
+ nsIScriptObjectOwner* cowner;
if (NS_OK == mContent->QueryInterface(kIScriptObjectOwnerIID,
- (void**) &owner)) {
- ret = manager->AddScriptEventListener(context, owner,
+ (void**) &cowner)) {
+ ret = manager->AddScriptEventListener(context, cowner,
aAttribute, aValue, aIID);
- NS_RELEASE(owner);
+ NS_RELEASE(cowner);
}
NS_RELEASE(manager);
}
diff --git a/mozilla/layout/base/src/nsTextFragment.cpp b/mozilla/layout/base/src/nsTextFragment.cpp
index a01515899f8..e9adc87defd 100644
--- a/mozilla/layout/base/src/nsTextFragment.cpp
+++ b/mozilla/layout/base/src/nsTextFragment.cpp
@@ -118,10 +118,10 @@ nsTextFragment::SetTo(const PRUnichar* aBuffer, PRInt32 aLength)
if (0 != aLength) {
// See if we need to store the data in ucs2 or not
PRBool need2 = PR_FALSE;
- const PRUnichar* cp = aBuffer;
- const PRUnichar* end = aBuffer + aLength;
- while (cp < end) {
- PRUnichar ch = *cp++;
+ const PRUnichar* ucp = aBuffer;
+ const PRUnichar* uend = aBuffer + aLength;
+ while (ucp < uend) {
+ PRUnichar ch = *ucp++;
if (ch >> 8) {
need2 = PR_TRUE;
break;
diff --git a/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp b/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp
index f32ba268758..cb94c96bfd3 100644
--- a/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp
+++ b/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp
@@ -2410,7 +2410,7 @@ nsGenericHTMLContainerElement::ReplaceChild(nsIDOMNode* aNewChild,
IndexOf(content, pos);
if (pos >= 0) {
nsIContent* newContent = nsnull;
- nsresult res = aNewChild->QueryInterface(kIContentIID, (void**)&newContent);
+ res = aNewChild->QueryInterface(kIContentIID, (void**)&newContent);
NS_ASSERTION(NS_OK == res, "Must be an nsIContent");
if (NS_OK == res) {
// Check if this is a document fragment. If it is, we need
diff --git a/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp b/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp
index 9fcbbe0c9f9..afa66e1fddf 100644
--- a/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp
+++ b/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp
@@ -1069,8 +1069,8 @@ CSSStyleSheetImpl::CSSStyleSheetImpl()
mDocument(nsnull),
mOwningNode(nsnull),
mDisabled(PR_FALSE),
- mScriptObject(nsnull),
- mDirty(PR_FALSE)
+ mDirty(PR_FALSE),
+ mScriptObject(nsnull)
{
NS_INIT_REFCNT();
nsCSSAtoms::AddrefAtoms();
@@ -1095,9 +1095,9 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(const CSSStyleSheetImpl& aCopy)
mDocument(aCopy.mDocument),
mOwningNode(aCopy.mOwningNode),
mDisabled(aCopy.mDisabled),
+ mDirty(PR_FALSE),
mScriptObject(nsnull),
- mInner(aCopy.mInner),
- mDirty(PR_FALSE)
+ mInner(aCopy.mInner)
{
NS_INIT_REFCNT();
nsCSSAtoms::AddrefAtoms();
diff --git a/mozilla/layout/html/tests/TestCSSPropertyLookup.cpp b/mozilla/layout/html/tests/TestCSSPropertyLookup.cpp
index a989d6efdb9..83de8a16595 100644
--- a/mozilla/layout/html/tests/TestCSSPropertyLookup.cpp
+++ b/mozilla/layout/html/tests/TestCSSPropertyLookup.cpp
@@ -66,7 +66,7 @@ int TestProps() {
}
// Now make sure we don't find some garbage
- for (int i = 0; i < sizeof(kJunkNames) / sizeof(const char*); i++) {
+ for (int i = 0; i < int(sizeof(kJunkNames) / sizeof(const char*)); i++) {
const char* tag = kJunkNames[i];
id = nsCSSProps::LookupName(tag);
if (id >= 0) {
@@ -115,7 +115,7 @@ int TestKeywords() {
}
// Now make sure we don't find some garbage
- for (int i = 0; i < sizeof(kJunkNames) / sizeof(const char*); i++) {
+ for (int i = 0; i < int(sizeof(kJunkNames) / sizeof(const char*)); i++) {
const char* tag = kJunkNames[i];
id = nsCSSKeywords::LookupName(tag);
if (id >= 0) {
diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp
index 9fcbbe0c9f9..afa66e1fddf 100644
--- a/mozilla/layout/style/nsCSSStyleSheet.cpp
+++ b/mozilla/layout/style/nsCSSStyleSheet.cpp
@@ -1069,8 +1069,8 @@ CSSStyleSheetImpl::CSSStyleSheetImpl()
mDocument(nsnull),
mOwningNode(nsnull),
mDisabled(PR_FALSE),
- mScriptObject(nsnull),
- mDirty(PR_FALSE)
+ mDirty(PR_FALSE),
+ mScriptObject(nsnull)
{
NS_INIT_REFCNT();
nsCSSAtoms::AddrefAtoms();
@@ -1095,9 +1095,9 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(const CSSStyleSheetImpl& aCopy)
mDocument(aCopy.mDocument),
mOwningNode(aCopy.mOwningNode),
mDisabled(aCopy.mDisabled),
+ mDirty(PR_FALSE),
mScriptObject(nsnull),
- mInner(aCopy.mInner),
- mDirty(PR_FALSE)
+ mInner(aCopy.mInner)
{
NS_INIT_REFCNT();
nsCSSAtoms::AddrefAtoms();
diff --git a/mozilla/parser/htmlparser/src/nsLoggingSink.cpp b/mozilla/parser/htmlparser/src/nsLoggingSink.cpp
index d33c88275a4..9749e605dc0 100644
--- a/mozilla/parser/htmlparser/src/nsLoggingSink.cpp
+++ b/mozilla/parser/htmlparser/src/nsLoggingSink.cpp
@@ -455,8 +455,6 @@ nsLoggingSink::WriteAttributes(const nsIParserNode& aNode)
if (0 != strchr(gSkippedContentTags, aNode.GetNodeType())) {
const nsString& content = aNode.GetSkippedContent();
if (content.Length() > 0) {
- nsAutoString tmp;
-
QuoteText(content, tmp);
(*mOutput) << " " << endl;
diff --git a/mozilla/xpcom/io/nsUnicharInputStream.cpp b/mozilla/xpcom/io/nsUnicharInputStream.cpp
index d3647c1b351..242f7766641 100644
--- a/mozilla/xpcom/io/nsUnicharInputStream.cpp
+++ b/mozilla/xpcom/io/nsUnicharInputStream.cpp
@@ -190,8 +190,11 @@ ConverterInputStream::ConverterInputStream(nsIInputStream* aStream,
if (aBufferSize == 0) {
aBufferSize = 8192;
}
- nsresult rv1 = NS_NewByteBuffer(&mByteData, nsnull, aBufferSize);
- nsresult rv2 = NS_NewUnicharBuffer(&mUnicharData, nsnull, aBufferSize);
+
+ // XXX what if these fail?
+ NS_NewByteBuffer(&mByteData, nsnull, aBufferSize);
+ NS_NewUnicharBuffer(&mUnicharData, nsnull, aBufferSize);
+
mByteDataOffset = 0;
mUnicharDataOffset = 0;
mUnicharDataLength = 0;
diff --git a/mozilla/xpcom/tests/TestCRT.cpp b/mozilla/xpcom/tests/TestCRT.cpp
index 61d782f1a16..072f8300c79 100644
--- a/mozilla/xpcom/tests/TestCRT.cpp
+++ b/mozilla/xpcom/tests/TestCRT.cpp
@@ -78,12 +78,12 @@ static Test tests[] = {
{ "bar", "foo", 3 },
{ "bar", "fo", 3 },
};
-#define NUM_TESTS (sizeof(tests) / sizeof(tests[0]))
+#define NUM_TESTS int((sizeof(tests) / sizeof(tests[0])))
int main()
{
Test* tp = tests;
- for (PRIntn i = 0; i < NUM_TESTS; i++, tp++) {
+ for (int i = 0; i < NUM_TESTS; i++, tp++) {
Check(tp->s1, tp->s2, tp->n);
}