Bug 552330: Remove NS_ARRAY_LENGTH redefinition in TestObserverArray.cpp to fix compile warning. r=dbaron a=dholbert_sheriff
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 23 Apr 2010 13:45:51 -0700
changeset 41217 4ad69565713134832365a081c21ebe7119ace25a
parent 41216 bd5f3bf5c5115aae7b4fbb263a150b6e64155162
child 41218 9cdef34053c2b0cf64ea0c4abc3434f1bef3c92b
push idunknown
push userunknown
push dateunknown
reviewersdbaron, dholbert_sheriff
bugs552330
milestone1.9.3a5pre
Bug 552330: Remove NS_ARRAY_LENGTH redefinition in TestObserverArray.cpp to fix compile warning. r=dbaron a=dholbert_sheriff
xpcom/tests/TestObserverArray.cpp
--- a/xpcom/tests/TestObserverArray.cpp
+++ b/xpcom/tests/TestObserverArray.cpp
@@ -34,21 +34,20 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "TestHarness.h"
 #include "nsTObserverArray.h"
+#include "nsMemory.h" // for NS_ARRAY_LENGTH
 
 typedef nsTObserverArray<int> Array;
 
-#define NS_ARRAY_LENGTH(_x) (sizeof(_x)/sizeof(*_x))
-
 #define DO_TEST(_type, _exp, _code)                                   \
   do {                                                                \
     ++testNum;                                                        \
     count = 0;                                                        \
     Array::_type iter(arr);                                           \
     while (iter.HasMore() && count != NS_ARRAY_LENGTH(_exp)) {        \
       _code                                                           \
       int next = iter.GetNext();                                      \