fix for bug 119220 - Occurances of uninitialized variables being used before being set, r=dougt, sr=darin

This commit is contained in:
neeti%netscape.com 2002-02-18 15:22:56 +00:00
parent 9445831f73
commit 3e0aa934af
5 changed files with 5 additions and 5 deletions

View File

@ -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.

View File

@ -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,

View File

@ -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) {

View File

@ -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];

View File

@ -419,7 +419,7 @@ TestConnection::Run(void)
nsresult TestConnection::WriteBuffer(void)
{
nsresult rv;
nsresult rv = NS_ERROR_FAILURE;
char *buffer;
PRInt32 size;
PRUint32 bytesWritten;