Bug 753067 - Fix some warnings. r=dbolter
authorHub Figuière <hfiguiere@mozilla.com>
Tue, 08 May 2012 13:27:05 -0700
changeset 95790 e40ee1b66d6d74987819d1459be09277c173adf0
parent 95789 632bf498111594f0a4883c73ae2e356276ad19e4
child 95791 9277703e34bddecba518de7d3a59a273cdca4d9c
push id1439
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 20:19:22 +0000
treeherdermozilla-aurora@ea74834dccd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbolter
bugs753067
milestone15.0a1
Bug 753067 - Fix some warnings. r=dbolter
accessible/src/atk/ApplicationAccessibleWrap.cpp
accessible/src/atk/nsAccessibleWrap.cpp
accessible/src/base/AccIterator.cpp
accessible/src/base/TextAttrs.h
--- a/accessible/src/atk/ApplicationAccessibleWrap.cpp
+++ b/accessible/src/atk/ApplicationAccessibleWrap.cpp
@@ -627,19 +627,19 @@ ApplicationAccessibleWrap::Init()
         // Init atk-bridge now
         PR_SetEnv("NO_AT_BRIDGE=0");
 
         // load and initialize atk-bridge library
         rv = LoadGtkModule(sAtkBridge);
         if (NS_SUCCEEDED(rv)) {
             // init atk-bridge
             (*sAtkBridge.init)();
+        } else {
+            MAI_LOG_DEBUG(("Fail to load lib: %s\n", sAtkBridge.libName));
         }
-        else
-            MAI_LOG_DEBUG(("Fail to load lib: %s\n", sAtkBridge.libName));
 
         if (!sToplevel_event_hook_added) {
           sToplevel_event_hook_added = true;
           sToplevel_show_hook =
             g_signal_add_emission_hook(g_signal_lookup("show", GTK_TYPE_WINDOW),
               0, toplevel_event_watcher,
               reinterpret_cast<gpointer>(nsIAccessibleEvent::EVENT_SHOW), NULL);
           sToplevel_hide_hook =
--- a/accessible/src/atk/nsAccessibleWrap.cpp
+++ b/accessible/src/atk/nsAccessibleWrap.cpp
@@ -1377,20 +1377,21 @@ nsAccessibleWrap::FireAtkTextChangedEven
   g_free(signal_name);
   return NS_OK;
 }
 
 nsresult
 nsAccessibleWrap::FireAtkShowHideEvent(AccEvent* aEvent,
                                        AtkObject *aObject, bool aIsAdded)
 {
-    if (aIsAdded)
+    if (aIsAdded) {
         MAI_LOG_DEBUG(("\n\nReceived: Show event\n"));
-    else
+    } else {
         MAI_LOG_DEBUG(("\n\nReceived: Hide event\n"));
+    }
 
     PRInt32 indexInParent = getIndexInParentCB(aObject);
     AtkObject *parentObject = getParentCB(aObject);
     NS_ENSURE_STATE(parentObject);
 
     bool isFromUserInput = aEvent->IsFromUserInput();
     char *signal_name = g_strconcat(aIsAdded ? "children_changed::add" :  "children_changed::remove",
                                     isFromUserInput ? "" : kNonUserInputEvent, NULL);
--- a/accessible/src/base/AccIterator.cpp
+++ b/accessible/src/base/AccIterator.cpp
@@ -275,17 +275,17 @@ XULDescriptionIterator::Next()
 
 ////////////////////////////////////////////////////////////////////////////////
 // IDRefsIterator
 ////////////////////////////////////////////////////////////////////////////////
 
 IDRefsIterator::
   IDRefsIterator(nsDocAccessible* aDoc, nsIContent* aContent,
                  nsIAtom* aIDRefsAttr) :
-  mCurrIdx(0), mContent(aContent), mDoc(aDoc)
+  mContent(aContent), mDoc(aDoc), mCurrIdx(0)
 {
   if (mContent->IsInDoc())
     mContent->GetAttr(kNameSpaceID_None, aIDRefsAttr, mIDs);
 }
 
 const nsDependentSubstring
 IDRefsIterator::NextID()
 {
--- a/accessible/src/base/TextAttrs.h
+++ b/accessible/src/base/TextAttrs.h
@@ -58,18 +58,18 @@ namespace a11y {
  */
 class TextAttrsMgr
 {
 public:
   /**
    * Constructor. Used to expose default text attributes.
    */
   TextAttrsMgr(nsHyperTextAccessible* aHyperTextAcc) :
-    mHyperTextAcc(aHyperTextAcc), mIncludeDefAttrs(true),
-    mOffsetAcc(nsnull), mOffsetAccIdx(-1) { }
+    mOffsetAcc(nsnull),  mHyperTextAcc(aHyperTextAcc),
+    mOffsetAccIdx(-1), mIncludeDefAttrs(true) { }
 
   /**
    * Constructor. Used to expose text attributes at the given offset.
    *
    * @param aHyperTextAcc    [in] hyper text accessible text attributes are
    *                          calculated for
    * @param aIncludeDefAttrs [optional] indicates whether default text
    *                          attributes should be included into list of exposed
@@ -77,18 +77,18 @@ public:
    * @param oOffsetAcc       [optional] offset an accessible the text attributes
    *                          should be calculated for
    * @param oOffsetAccIdx    [optional] index in parent of offset accessible
    */
   TextAttrsMgr(nsHyperTextAccessible* aHyperTextAcc,
                bool aIncludeDefAttrs,
                nsAccessible* aOffsetAcc,
                PRInt32 aOffsetAccIdx) :
-    mHyperTextAcc(aHyperTextAcc), mIncludeDefAttrs(aIncludeDefAttrs),
-    mOffsetAcc(aOffsetAcc), mOffsetAccIdx(aOffsetAccIdx) { }
+    mOffsetAcc(aOffsetAcc), mHyperTextAcc(aHyperTextAcc),
+    mOffsetAccIdx(aOffsetAccIdx), mIncludeDefAttrs(aIncludeDefAttrs) { }
 
   /*
    * Return text attributes and hyper text offsets where these attributes are
    * applied. Offsets are calculated in the case of non default attributes.
    *
    * @note In the case of default attributes pointers on hyper text offsets
    *       must be skipped.
    *
@@ -113,18 +113,18 @@ protected:
    */
   class TextAttr;
   void GetRange(TextAttr* aAttrArray[], PRUint32 aAttrArrayLen,
                 PRInt32* aStartHTOffset, PRInt32* aEndHTOffset);
 
 private:
   nsAccessible* mOffsetAcc;
   nsHyperTextAccessible* mHyperTextAcc;
-  PRInt32 mOffsetAccIdx;
-  bool mIncludeDefAttrs;
+  PRInt32 mOffsetAccIdx;
+  bool mIncludeDefAttrs;
 
 protected:
 
   /**
    * Interface class of text attribute class implementations.
    */
   class TextAttr
   {