Last Comment Bug 753067 - initializer reorder warning + suggested brace (debug code)
: initializer reorder warning + suggested brace (debug code)
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla15
Assigned To: Hubert Figuiere [:hub]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-08 12:57 PDT by Hubert Figuiere [:hub]
Modified: 2012-05-08 18:53 PDT (History)
2 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix some warnings. r= (5.32 KB, patch)
2012-05-08 12:57 PDT, Hubert Figuiere [:hub]
dbolter: review+
Details | Diff | Splinter Review

Description Hubert Figuiere [:hub] 2012-05-08 12:57:00 PDT
When building m-c, there are some initializer reorder warning and suggested brace (debug code) warnings.

Attaching patch to fix these.
Comment 1 Hubert Figuiere [:hub] 2012-05-08 12:57:46 PDT
Created attachment 622100 [details] [diff] [review]
Fix some warnings. r=
Comment 2 Hubert Figuiere [:hub] 2012-05-08 12:58:53 PDT
Comment on attachment 622100 [details] [diff] [review]
Fix some warnings. r=

Review of attachment 622100 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/src/base/TextAttrs.h
@@ +118,5 @@
>  private:
>    nsAccessible* mOffsetAcc;
>    nsHyperTextAccessible* mHyperTextAcc;
> +  PRInt32 mOffsetAccIdx;
> +  bool mIncludeDefAttrs;

These two lines, I removed a spurious ^M left by a Windows editor.
Comment 3 David Bolter [:davidb] 2012-05-08 13:13:08 PDT
Comment on attachment 622100 [details] [diff] [review]
Fix some warnings. r=

Review of attachment 622100 [details] [diff] [review]:
-----------------------------------------------------------------

r=me fine with me.

::: accessible/src/atk/ApplicationAccessibleWrap.cpp
@@ +637,2 @@
>              MAI_LOG_DEBUG(("Fail to load lib: %s\n", sAtkBridge.libName));
> +        }

Ah right... multi statement macro danger.
Comment 4 Trevor Saunders (:tbsaunde) 2012-05-08 13:24:03 PDT
Comment on attachment 622100 [details] [diff] [review]
Fix some warnings. r=

>         if (NS_SUCCEEDED(rv)) {
>             // init atk-bridge
>             (*sAtkBridge.init)();
>         }
>-        else
>+        else {
>             MAI_LOG_DEBUG(("Fail to load lib: %s\n", sAtkBridge.libName));
>+        }

I tend to think the better fix is to make sure macros like this always expand to a statement

Also always use } else {
Comment 5 Hubert Figuiere [:hub] 2012-05-08 13:25:20 PDT
I'll fix the braces :-)
Comment 7 Ryan VanderMeulen [:RyanVM] 2012-05-08 18:53:58 PDT
https://hg.mozilla.org/mozilla-central/rev/e40ee1b66d6d

Note You need to log in before you can comment on or make changes to this bug.