Bug 59675, fixing uninitialized variables. r=jst, a=waterson.

git-svn-id: svn://10.0.0.236/trunk@82928 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
heikki%netscape.com 2000-11-27 23:23:28 +00:00
parent 1cab05269a
commit a02e205742
13 changed files with 37 additions and 43 deletions

View File

@ -647,7 +647,7 @@ DocumentViewerImpl::Init(nsIWidget* aParentWidget,
NS_IMETHODIMP
DocumentViewerImpl::LoadComplete(nsresult aStatus)
{
nsresult rv;
nsresult rv = NS_OK;
nsCOMPtr<nsIScriptGlobalObject> global;

View File

@ -275,7 +275,7 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
mDocument->SetRootContent(mDocElement);
nsresult rv;
nsresult rv = NS_OK;
if (mXSLTransformMediator) {
rv = SetupTransformMediator();
}

View File

@ -647,7 +647,7 @@ DocumentViewerImpl::Init(nsIWidget* aParentWidget,
NS_IMETHODIMP
DocumentViewerImpl::LoadComplete(nsresult aStatus)
{
nsresult rv;
nsresult rv = NS_OK;
nsCOMPtr<nsIScriptGlobalObject> global;

View File

@ -647,7 +647,7 @@ DocumentViewerImpl::Init(nsIWidget* aParentWidget,
NS_IMETHODIMP
DocumentViewerImpl::LoadComplete(nsresult aStatus)
{
nsresult rv;
nsresult rv = NS_OK;
nsCOMPtr<nsIScriptGlobalObject> global;

View File

@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
if (gNoisy) {
gNoiseIndent++;
}
PRTime start;
PRInt32 ctc;
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
if (gLameReflowMetrics) {
start = PR_Now();
ctc = nsLineBox::GetCtorCount();
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
depth = GetDepth();
}
}
PRTime start;
PRInt32 drawnLines;
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
if (gLamePaintMetrics) {
start = PR_Now();
drawnLines = 0;

View File

@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
if (gNoisy) {
gNoiseIndent++;
}
PRTime start;
PRInt32 ctc;
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
if (gLameReflowMetrics) {
start = PR_Now();
ctc = nsLineBox::GetCtorCount();
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
depth = GetDepth();
}
}
PRTime start;
PRInt32 drawnLines;
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
if (gLamePaintMetrics) {
start = PR_Now();
drawnLines = 0;

View File

@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
if (gNoisy) {
gNoiseIndent++;
}
PRTime start;
PRInt32 ctc;
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
if (gLameReflowMetrics) {
start = PR_Now();
ctc = nsLineBox::GetCtorCount();
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
depth = GetDepth();
}
}
PRTime start;
PRInt32 drawnLines;
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
if (gLamePaintMetrics) {
start = PR_Now();
drawnLines = 0;

View File

@ -952,26 +952,23 @@ nsImageMap::IsInside(nscoord aX, nscoord aY,
Area* area = (Area*) mAreas.ElementAt(i);
if (area->IsInside(aX, aY)) {
if (area->GetHasURL()) {
nsresult rv;
// Set the image loader's source URL and base URL
nsIURI* baseUri = nsnull;
nsIHTMLContent* htmlContent;
if (mMap) {
rv = mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent);
if (NS_SUCCEEDED(rv)) {
nsIHTMLContent* htmlContent;
if (NS_SUCCEEDED( mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent) )) {
htmlContent->GetBaseURL(baseUri);
NS_RELEASE(htmlContent);
}
else {
nsIDocument* doc;
rv = mMap->GetDocument(doc);
if (NS_SUCCEEDED(rv)) {
if (NS_SUCCEEDED( mMap->GetDocument(doc) ) && doc) {
doc->GetBaseURL(baseUri); // Could just use mDocument here...
NS_RELEASE(doc);
}
}
}
if (NS_FAILED(rv) || !baseUri) return PR_FALSE;
if (!baseUri) return PR_FALSE;
nsAutoString href;
area->GetHREF(href);

View File

@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
if (gNoisy) {
gNoiseIndent++;
}
PRTime start;
PRInt32 ctc;
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
if (gLameReflowMetrics) {
start = PR_Now();
ctc = nsLineBox::GetCtorCount();
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
depth = GetDepth();
}
}
PRTime start;
PRInt32 drawnLines;
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
if (gLamePaintMetrics) {
start = PR_Now();
drawnLines = 0;

View File

@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
if (gNoisy) {
gNoiseIndent++;
}
PRTime start;
PRInt32 ctc;
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
if (gLameReflowMetrics) {
start = PR_Now();
ctc = nsLineBox::GetCtorCount();
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
depth = GetDepth();
}
}
PRTime start;
PRInt32 drawnLines;
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
if (gLamePaintMetrics) {
start = PR_Now();
drawnLines = 0;

View File

@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
if (gNoisy) {
gNoiseIndent++;
}
PRTime start;
PRInt32 ctc;
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
if (gLameReflowMetrics) {
start = PR_Now();
ctc = nsLineBox::GetCtorCount();
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
depth = GetDepth();
}
}
PRTime start;
PRInt32 drawnLines;
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
if (gLamePaintMetrics) {
start = PR_Now();
drawnLines = 0;

View File

@ -952,26 +952,23 @@ nsImageMap::IsInside(nscoord aX, nscoord aY,
Area* area = (Area*) mAreas.ElementAt(i);
if (area->IsInside(aX, aY)) {
if (area->GetHasURL()) {
nsresult rv;
// Set the image loader's source URL and base URL
nsIURI* baseUri = nsnull;
nsIHTMLContent* htmlContent;
if (mMap) {
rv = mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent);
if (NS_SUCCEEDED(rv)) {
nsIHTMLContent* htmlContent;
if (NS_SUCCEEDED( mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent) )) {
htmlContent->GetBaseURL(baseUri);
NS_RELEASE(htmlContent);
}
else {
nsIDocument* doc;
rv = mMap->GetDocument(doc);
if (NS_SUCCEEDED(rv)) {
if (NS_SUCCEEDED( mMap->GetDocument(doc) ) && doc) {
doc->GetBaseURL(baseUri); // Could just use mDocument here...
NS_RELEASE(doc);
}
}
}
if (NS_FAILED(rv) || !baseUri) return PR_FALSE;
if (!baseUri) return PR_FALSE;
nsAutoString href;
area->GetHREF(href);

View File

@ -275,7 +275,7 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
mDocument->SetRootContent(mDocElement);
nsresult rv;
nsresult rv = NS_OK;
if (mXSLTransformMediator) {
rv = SetupTransformMediator();
}