Closed Bug 956095 Opened 11 years ago Closed 11 years ago

Compiler warnings in mozilla-central/xpcom/tests/TestCOMArray.cpp

Categories

(Core :: XPCOM, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: iosifadrianmihai, Assigned: iosifadrianmihai)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 (Beta/Release) Build ID: 20130201190337 Steps to reproduce: ./mach build Actual results: 0:36.18 Warning: -Wuninitialized in /home/andu/mozilla/mozilla-central/xpcom/tests/TestCOMArray.cpp: ‘fifthObject’ may be used uninitialized in this function 0:36.18 mozilla-central/xpcom/tests/TestCOMArray.cpp:242:7: warning: ‘fifthObject’ may be used uninitialized in this function [-Wuninitialized] 0:36.18 Warning: -Wuninitialized in /mozilla/mozilla-central/xpcom/tests/TestCOMArray.cpp: ‘fourthObject’ may be used uninitialized in this function 0:36.18 /mozilla-central/xpcom/tests/TestCOMArray.cpp:239:7: warning: ‘fourthObject’ may be used uninitialized in this function [-Wuninitialized] 0:36.18 Warning: -Wuninitialized in /mozilla-central/xpcom/tests/TestCOMArray.cpp: ‘thirdObject’ may be used uninitialized in this function 0:36.18 /mozilla-central/xpcom/tests/TestCOMArray.cpp:236:7: warning: ‘thirdObject’ may be used uninitialized in this function [-Wuninitialized] 0:36.18 Warning: -Wuninitialized in /home/andu/mozilla/mozilla-central/xpcom/tests/TestCOMArray.cpp: ‘fifthObject’ may be used uninitialized in this function 0:36.18 /mozilla-central/xpcom/tests/TestCOMArray.cpp:242:7: warning: ‘fifthObject’ may be used uninitialized in this function [-Wuninitialized] 0:36.18 Warning: -Wuninitialized in /mozilla-central/xpcom/tests/TestCOMArray.cpp: ‘fourthObject’ may be used uninitialized in this function 0:36.18 /mozilla-central/xpcom/tests/TestCOMArray.cpp:239:7: warning: ‘fourthObject’ may be used uninitialized in this function [-Wuninitialized] 0:36.18 Warning: -Wuninitialized in /home/andu/mozilla/mozilla-central/xpcom/tests/TestCOMArray.cpp: ‘thirdObject’ may be used uninitialized in this function 0:36.18 /mozilla-central/xpcom/tests/TestCOMArray.cpp:236:7: warning: ‘thirdObject’ may be used uninitialized in this function [-Wuninitialized]
Any kind of feedback would be much appreciated (I'm new to contributing). Thank you!
Attachment #8355260 - Flags: review?(doug.turner)
Comment on attachment 8355260 [details] [diff] [review] fixes warnings; initializes pointers Review of attachment 8355260 [details] [diff] [review]: ----------------------------------------------------------------- any reason not to use null? ::: xpcom/tests/TestCOMArray.cpp @@ +179,5 @@ > int32_t base; > { > Array2 arr2; > > + IBar *thirdObject = 0, null?
Attachment #8355260 - Flags: review?(doug.turner) → review-
I think Doug means nullptr. :-)
Changed initializing to nullptr.
Attachment #8357100 - Flags: review?(doug.turner)
Flags: needinfo?(doug.turner)
Comment on attachment 8357100 [details] [diff] [review] fixes warnings; initializes pointers (nullptr) Review of attachment 8357100 [details] [diff] [review]: ----------------------------------------------------------------- lgtm
Attachment #8357100 - Flags: review?(doug.turner) → review+
Flags: needinfo?(doug.turner)
Keywords: checkin-needed
Attachment #8355260 - Attachment is obsolete: true
Assignee: nobody → iosifadrianmihai
Flags: in-testsuite-
Keywords: checkin-needed
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: