Fix missing braces compile warning. No bug.
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 06 Dec 2011 01:45:13 -0500
changeset 82295 e7d4de514316e72529b2da8ea7a829c6ca6ed8c7
parent 82294 da074baa9f0585bf239296c6d3ef3ee5e1097eab
child 82296 bf8259fcab61b5966835b7cfc21ed5565c42fcfc
push id628
push userclegnitto@mozilla.com
push dateWed, 21 Dec 2011 14:41:57 +0000
treeherdermozilla-aurora@24a61ad789e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone11.0a1
Fix missing braces compile warning. No bug.
content/base/src/nsContentUtils.cpp
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -525,17 +525,17 @@ nsContentUtils::InitializeEventTable() {
   static const EventNameMapping eventArray[] = {
 #define EVENT(name_,  _id, _type, _struct)          \
     { nsGkAtoms::on##name_, _id, _type, _struct },
 #define WINDOW_ONLY_EVENT EVENT
 #define NON_IDL_EVENT EVENT
 #include "nsEventNameList.h"
 #undef WINDOW_ONLY_EVENT
 #undef EVENT
-    nsnull
+    { nsnull }
   };
 
   sAtomEventTable = new nsDataHashtable<nsISupportsHashKey, EventNameMapping>;
   sStringEventTable = new nsDataHashtable<nsStringHashKey, EventNameMapping>;
   sUserDefinedEvents = new nsCOMArray<nsIAtom>(64);
 
   if (!sAtomEventTable || !sStringEventTable || !sUserDefinedEvents ||
       !sAtomEventTable->Init(int(ArrayLength(eventArray) / 0.75) + 1) ||
@@ -573,17 +573,17 @@ nsContentUtils::InitializeTouchEventTabl
     sEventTableInitialized = true;
     static const EventNameMapping touchEventArray[] = {
 #define EVENT(name_,  _id, _type, _struct)
 #define TOUCH_EVENT(name_,  _id, _type, _struct)      \
       { nsGkAtoms::on##name_, _id, _type, _struct },
 #include "nsEventNameList.h"
 #undef TOUCH_EVENT
 #undef EVENT
-      nsnull
+      { nsnull }
     };
     // Subtract one from the length because of the trailing null
     for (PRUint32 i = 0; i < ArrayLength(touchEventArray) - 1; ++i) {
       if (!sAtomEventTable->Put(touchEventArray[i].mAtom, touchEventArray[i]) ||
           !sStringEventTable->Put(Substring(nsDependentAtomString(touchEventArray[i].mAtom), 2),
                                   touchEventArray[i])) {
         delete sAtomEventTable;
         sAtomEventTable = nsnull;