Closed
Bug 552330
Opened 14 years ago
Closed 14 years ago
Fix compile warning - TestObserverArray.cpp:45:1: warning: "NS_ARRAY_LENGTH" redefined
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: dholbert)
Details
(Whiteboard: [build_warning])
Attachments
(1 file)
1.25 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
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 "[0]" to get the size of the first array-element). The version in TestObserverArray.cpp should just be removed.
Assignee | ||
Comment 1•14 years ago
|
||
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?
Comment on attachment 432491 [details] [diff] [review] fix r=dbaron
Attachment #432491 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 3•14 years ago
|
||
Thanks! pushed: http://hg.mozilla.org/mozilla-central/rev/4ad695657131
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•14 years ago
|
Whiteboard: [build_warning]
You need to log in
before you can comment on or make changes to this bug.
Description
•