diff --git a/mozilla/netwerk/base/public/nsReadLine.h b/mozilla/netwerk/base/public/nsReadLine.h index 6c17e7ccaa0..394e245d1b9 100644 --- a/mozilla/netwerk/base/public/nsReadLine.h +++ b/mozilla/netwerk/base/public/nsReadLine.h @@ -60,7 +60,7 @@ NS_ReadLine (nsIInputStream* aStream, nsLineBuffer * aBuffer, nsAutoString temp; *more = PR_TRUE; PRBool eolStarted = PR_FALSE; - char eolchar; + char eolchar = '\0'; aLine.Truncate(); while (1) { // will be returning out of this loop on eol or eof if (aBuffer->empty) { // buffer is empty. Read into it. diff --git a/mozilla/netwerk/base/src/nsFileTransport.cpp b/mozilla/netwerk/base/src/nsFileTransport.cpp index 4eb4cfc9380..9a039998a67 100644 --- a/mozilla/netwerk/base/src/nsFileTransport.cpp +++ b/mozilla/netwerk/base/src/nsFileTransport.cpp @@ -929,7 +929,7 @@ nsFileTransport::Process(nsIProgressEventSink *progressSink) if (mTransferAmount >= 0) transferAmt = PR_MIN(transferAmt, (PRUint32)mTransferAmount); - PRUint32 total, offset = mSinkWrapper->GetBytesWritten(); + PRUint32 total = 0, offset = mSinkWrapper->GetBytesWritten(); // Ask the provider for data nsresult status = mProvider->OnDataWritable(this, mContext, diff --git a/mozilla/netwerk/streamconv/converters/nsFTPDirListingConv.cpp b/mozilla/netwerk/streamconv/converters/nsFTPDirListingConv.cpp index bfab9821b08..5e1f40c0651 100644 --- a/mozilla/netwerk/streamconv/converters/nsFTPDirListingConv.cpp +++ b/mozilla/netwerk/streamconv/converters/nsFTPDirListingConv.cpp @@ -927,7 +927,7 @@ nsFTPDirListingConv::DigestBufferLines(char *aBuffer, nsCString &aString) { int flagcwd = 0; int when = 0; int flagsize = 0; - unsigned long size; + unsigned long size = 0; PRBool processing = PR_TRUE; while (*line && processing) switch (*line) { diff --git a/mozilla/netwerk/test/TestPageLoad.cpp b/mozilla/netwerk/test/TestPageLoad.cpp index 9777086211b..0bbdbfa177d 100644 --- a/mozilla/netwerk/test/TestPageLoad.cpp +++ b/mozilla/netwerk/test/TestPageLoad.cpp @@ -195,7 +195,7 @@ MyListener::OnDataAvailable(nsIRequest *req, nsISupports *ctxt, PRUint32 offset, PRUint32 count) { //printf(">>> OnDataAvailable [count=%u]\n", count); - nsresult rv; + nsresult rv = NS_ERROR_FAILURE; PRUint32 bytesRead=0; int i=0; char buf[1024]; diff --git a/mozilla/netwerk/test/TestSocketTransport.cpp b/mozilla/netwerk/test/TestSocketTransport.cpp index a9f22af2289..a7176fe0773 100644 --- a/mozilla/netwerk/test/TestSocketTransport.cpp +++ b/mozilla/netwerk/test/TestSocketTransport.cpp @@ -419,7 +419,7 @@ TestConnection::Run(void) nsresult TestConnection::WriteBuffer(void) { - nsresult rv; + nsresult rv = NS_ERROR_FAILURE; char *buffer; PRInt32 size; PRUint32 bytesWritten;