I get this compile warning when building mozilla-central on linux: >../../../mozilla/xpcom/tests/TestObserverArray.cpp:45:1: warning: "NS_ARRAY_LENGTH" redefined >In file included from ../../dist/include/nsString.h:209, > from ../../dist/include/nsStringGlue.h:49, > from ../../../mozilla/xpcom/tests/TestHarness.h:51, > from ../../../mozilla/xpcom/tests/TestObserverArray.cpp:40: >../../dist/include/nsMemory.h:156:1: warning: this is the location of the previous definition For some reason, TestObserverArray.cpp has its own personal declaration of NS_ARRAY_LENGTH. It's effectively the same as the one in nsMemory.h. (The only difference is use of "*" vs "" to get the size of the first array-element). The version in TestObserverArray.cpp should just be removed.
Created attachment 432491 [details] [diff] [review] fix Presumably at some point since this test was checked in, it got an indirect #include of nsMemory.h. (I assume that was the reason we directly included NS_ARRAY_LENGTH in the test in the first place.) I'm including a direct #include just for good measure, in case the fortuitous indirect #include chain gets broken later on. bz, mind rubber-stamping this tweak to your test?
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #432491 - Flags: review?(bzbarsky)
Comment on attachment 432491 [details] [diff] [review] fix r=dbaron
Attachment #432491 - Flags: review?(bzbarsky) → review+
Thanks! pushed: http://hg.mozilla.org/mozilla-central/rev/4ad695657131
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.