Bug 782853 Initialize scrollType to avoid -Wsometimes-unitialized warnings r=smaug
authorReuben Morais <reuben.morais@gmail.com>
Wed, 15 Aug 2012 22:32:59 +0900
changeset 107882 0b26e7597f318860cdeaa6384e48319fcf5b67df
parent 107881 53639beddbc2a7f533c5c27f442d9074cbef9470
child 107883 3bc014ea9703529dd858f4445f706d01067a44ad
push id1490
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 18:29:50 +0000
treeherdermozilla-beta@f335e7dacdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs782853
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 782853 Initialize scrollType to avoid -Wsometimes-unitialized warnings r=smaug
widget/nsGUIEventIPC.h
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -114,17 +114,17 @@ struct ParamTraits<mozilla::widget::Whee
     WriteParam(aMsg, aParam.lineOrPageDeltaY);
     WriteParam(aMsg, static_cast<PRInt32>(aParam.scrollType));
     WriteParam(aMsg, aParam.overflowDeltaX);
     WriteParam(aMsg, aParam.overflowDeltaY);
   }
 
   static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
   {
-    PRInt32 scrollType;
+    PRInt32 scrollType = 0;
     bool rv =
       ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
       ReadParam(aMsg, aIter, &aResult->deltaX) &&
       ReadParam(aMsg, aIter, &aResult->deltaY) &&
       ReadParam(aMsg, aIter, &aResult->deltaZ) &&
       ReadParam(aMsg, aIter, &aResult->deltaMode) &&
       ReadParam(aMsg, aIter, &aResult->customizedByUserPrefs) &&
       ReadParam(aMsg, aIter, &aResult->isMomentum) &&