From 05f7f232015eabf566ceb4978e287a8caf2a3f8c Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 13 Apr 2004 03:13:46 +0000 Subject: [PATCH] Fix a few warnings. Patch by gautheri, r+sr=roc git-svn-id: svn://10.0.0.236/trunk@154765 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsPresShell.cpp | 8 ++++---- mozilla/layout/html/base/src/nsPresShell.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 44c5efbd60a..d7f498f5838 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -4268,7 +4268,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame, // layout model) or aVPercent is not NS_PRESSHELL_SCROLL_ANYWHERE, we need to // change the top of the bounds to include the whole line. if (frameBounds.height == 0 || aVPercent != NS_PRESSHELL_SCROLL_ANYWHERE) { - nsIAtom* frameType; + nsIAtom* frameType = NULL; nsIFrame *prevFrame = aFrame; nsIFrame *frame = aFrame; @@ -6294,9 +6294,9 @@ PresShell::ProcessReflowCommands(PRBool aInterruptible) #endif // If reflow is interruptible, then make a note of our deadline. - PRIntervalTime deadline; - if (aInterruptible) - deadline = PR_IntervalNow() + PR_MicrosecondsToInterval(gMaxRCProcessingTime); + const PRIntervalTime deadline = aInterruptible + ? PR_IntervalNow() + PR_MicrosecondsToInterval(gMaxRCProcessingTime) + : (PRIntervalTime)0; // force flushing of any pending notifications mDocument->BeginUpdate(UPDATE_ALL); diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 44c5efbd60a..d7f498f5838 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -4268,7 +4268,7 @@ PresShell::ScrollFrameIntoView(nsIFrame *aFrame, // layout model) or aVPercent is not NS_PRESSHELL_SCROLL_ANYWHERE, we need to // change the top of the bounds to include the whole line. if (frameBounds.height == 0 || aVPercent != NS_PRESSHELL_SCROLL_ANYWHERE) { - nsIAtom* frameType; + nsIAtom* frameType = NULL; nsIFrame *prevFrame = aFrame; nsIFrame *frame = aFrame; @@ -6294,9 +6294,9 @@ PresShell::ProcessReflowCommands(PRBool aInterruptible) #endif // If reflow is interruptible, then make a note of our deadline. - PRIntervalTime deadline; - if (aInterruptible) - deadline = PR_IntervalNow() + PR_MicrosecondsToInterval(gMaxRCProcessingTime); + const PRIntervalTime deadline = aInterruptible + ? PR_IntervalNow() + PR_MicrosecondsToInterval(gMaxRCProcessingTime) + : (PRIntervalTime)0; // force flushing of any pending notifications mDocument->BeginUpdate(UPDATE_ALL);