From 3d8d35d25ff3116fff37f0bd7857746329470483 Mon Sep 17 00:00:00 2001 From: "warren%netscape.com" Date: Mon, 20 Sep 1999 20:57:21 +0000 Subject: [PATCH] Fixed warnings. git-svn-id: svn://10.0.0.236/trunk@48377 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/robot/nsDebugRobot.cpp | 1 - mozilla/netwerk/base/src/nsIOService.cpp | 1 - mozilla/netwerk/base/src/nsSimpleURI.cpp | 6 +++--- mozilla/netwerk/streamconv/test/TestStreamConv.cpp | 2 +- mozilla/parser/htmlparser/robot/nsDebugRobot.cpp | 1 - mozilla/uriloader/base/nsDocLoader.cpp | 2 +- mozilla/webshell/src/nsDocLoader.cpp | 2 +- mozilla/xpcom/io/nsPipe2.cpp | 1 - 8 files changed, 6 insertions(+), 10 deletions(-) diff --git a/mozilla/htmlparser/robot/nsDebugRobot.cpp b/mozilla/htmlparser/robot/nsDebugRobot.cpp index d1806eb89c9..a930f147b9c 100644 --- a/mozilla/htmlparser/robot/nsDebugRobot.cpp +++ b/mozilla/htmlparser/robot/nsDebugRobot.cpp @@ -310,7 +310,6 @@ extern "C" NS_EXPORT int DebugRobot( while (!g_bReadyForNextUrl) { if (yieldProc != NULL) { #ifdef NECKO - char* spec; (void)url->GetSpec(&spec); (*yieldProc)(spec); nsCRT::free(spec); diff --git a/mozilla/netwerk/base/src/nsIOService.cpp b/mozilla/netwerk/base/src/nsIOService.cpp index c5f5e6e44ff..1311511e985 100644 --- a/mozilla/netwerk/base/src/nsIOService.cpp +++ b/mozilla/netwerk/base/src/nsIOService.cpp @@ -145,7 +145,6 @@ GetScheme(const char* inURI, char* *scheme) if (!inURI) return NS_ERROR_NULL_POINTER; char c; const char* URI = inURI; - PRUint32 i = 0; PRUint32 length = 0; // skip leading white space while (isspace(*URI)) diff --git a/mozilla/netwerk/base/src/nsSimpleURI.cpp b/mozilla/netwerk/base/src/nsSimpleURI.cpp index f717e353504..eaaa0c3eb5f 100644 --- a/mozilla/netwerk/base/src/nsSimpleURI.cpp +++ b/mozilla/netwerk/base/src/nsSimpleURI.cpp @@ -87,14 +87,14 @@ NS_IMETHODIMP nsSimpleURI::SetSpec(const char* aSpec) { nsAutoString spec(aSpec); - PRUint32 pos = spec.Find(":"); + PRInt32 pos = spec.Find(":"); if (pos == -1) return NS_ERROR_FAILURE; nsAutoString scheme; - PRUint32 n = spec.Left(scheme, pos); + PRInt32 n = spec.Left(scheme, pos); NS_ASSERTION(n == pos, "Left failed"); nsAutoString path; - PRUint32 count = spec.Length() - pos - 1; + PRInt32 count = spec.Length() - pos - 1; n = spec.Mid(path, pos + 1, count); NS_ASSERTION(n == count, "Mid failed"); if (mScheme) diff --git a/mozilla/netwerk/streamconv/test/TestStreamConv.cpp b/mozilla/netwerk/streamconv/test/TestStreamConv.cpp index 397e4717b3c..948b25edd4f 100644 --- a/mozilla/netwerk/streamconv/test/TestStreamConv.cpp +++ b/mozilla/netwerk/streamconv/test/TestStreamConv.cpp @@ -84,7 +84,7 @@ public: rv = inStr->Read(buffer, len, &read); buffer[len] = '\0'; if (NS_SUCCEEDED(rv)) { - printf("CONTEXT %x: Received %d bytes and the following data: \n %s\n\n", ctxt, read, buffer); + printf("CONTEXT %x: Received %u bytes and the following data: \n %s\n\n", ctxt, read, buffer); } nsAllocator::Free(buffer); diff --git a/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp b/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp index d1806eb89c9..a930f147b9c 100644 --- a/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp +++ b/mozilla/parser/htmlparser/robot/nsDebugRobot.cpp @@ -310,7 +310,6 @@ extern "C" NS_EXPORT int DebugRobot( while (!g_bReadyForNextUrl) { if (yieldProc != NULL) { #ifdef NECKO - char* spec; (void)url->GetSpec(&spec); (*yieldProc)(spec); nsCRT::free(spec); diff --git a/mozilla/uriloader/base/nsDocLoader.cpp b/mozilla/uriloader/base/nsDocLoader.cpp index 70f5e547f27..dde3f066f37 100644 --- a/mozilla/uriloader/base/nsDocLoader.cpp +++ b/mozilla/uriloader/base/nsDocLoader.cpp @@ -341,7 +341,7 @@ nsDocLoaderImpl::Init() if (NS_FAILED(rv)) return rv; PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, - ("DocLoader:%p: load group %x.\n", this, mLoadGroup)); + ("DocLoader:%p: load group %x.\n", this, mLoadGroup.get())); rv = mLoadGroup->SetGroupListenerFactory(this); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/webshell/src/nsDocLoader.cpp b/mozilla/webshell/src/nsDocLoader.cpp index 70f5e547f27..dde3f066f37 100644 --- a/mozilla/webshell/src/nsDocLoader.cpp +++ b/mozilla/webshell/src/nsDocLoader.cpp @@ -341,7 +341,7 @@ nsDocLoaderImpl::Init() if (NS_FAILED(rv)) return rv; PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, - ("DocLoader:%p: load group %x.\n", this, mLoadGroup)); + ("DocLoader:%p: load group %x.\n", this, mLoadGroup.get())); rv = mLoadGroup->SetGroupListenerFactory(this); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/xpcom/io/nsPipe2.cpp b/mozilla/xpcom/io/nsPipe2.cpp index 4a67da7232e..26b0afa9cd5 100644 --- a/mozilla/xpcom/io/nsPipe2.cpp +++ b/mozilla/xpcom/io/nsPipe2.cpp @@ -224,7 +224,6 @@ nsPipe::GetReadSegment(PRUint32 segmentLogicalOffset, PRInt32 offset = (PRInt32)segmentLogicalOffset; PRInt32 segCount = mBuffer.GetSegmentCount(); - PRBool atEnd = PR_FALSE; for (PRInt32 i = 0; i < segCount; i++) { char* segStart = mBuffer.GetSegment(i); char* segEnd = segStart + mBuffer.GetSegmentSize();