Last Comment Bug 700992 - Fix GCC compile warnings in XPConnect
: Fix GCC compile warnings in XPConnect
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: Nicholas Nethercote [:njn]
:
Mentors:
Depends on:
Blocks: buildwarning
  Show dependency treegraph
 
Reported: 2011-11-09 04:31 PST by Nicholas Nethercote [:njn]
Modified: 2011-11-21 09:05 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.73 KB, patch)
2011-11-09 04:31 PST, Nicholas Nethercote [:njn]
bobbyholley: review+
Details | Diff | Splinter Review
patch v2 (7.87 KB, patch)
2011-11-10 16:23 PST, Nicholas Nethercote [:njn]
gal: review+
Details | Diff | Splinter Review

Description Nicholas Nethercote [:njn] 2011-11-09 04:31:14 PST
Created attachment 573157 [details] [diff] [review]
patch

Compiling XPConnect with GCC 4.6 gives 100s of warnings.  This patch fixes all but one that's actually from xpcom/ds/nsCheapSets.h that I was reluctant to address.  The nsDOMQS.h change fixed most of them.
Comment 1 Bobby Holley (:bholley) (busy with Stylo) 2011-11-09 05:04:49 PST
Comment on attachment 573157 [details] [diff] [review]
patch

I don't think the explanatory comments are necessary - please kill them. r=bholley with that.

I'm not actually an XPConnect peer though (yet). Flagging peterv for the rubber stamp.
Comment 2 Andrew McCreight [:mccr8] 2011-11-09 05:44:36 PST
Yeah, randomly initializing stuff to shut up compilers is a fairly common pattern.
Comment 3 Nicholas Nethercote [:njn] 2011-11-10 16:23:21 PST
Created attachment 573693 [details] [diff] [review]
patch v2

New patch:

- Fixes a couple more warnings that only occur in optimized builds.

- Removes the comments, except the one in xpc_qsUnwrapThis();  I think it's unusual enough (the warnings happen only in functions that call it) to be worth keeping, though I'll remove if others disagree strongly.
Comment 4 Nicholas Nethercote [:njn] 2011-11-20 11:28:30 PST
peterv, can you please review this?  It's a tiny patch and bholley thinks its fine.
Comment 5 Andreas Gal :gal 2011-11-20 12:42:32 PST
Comment on attachment 573693 [details] [diff] [review]
patch v2

Stealing.
Comment 6 Nicholas Nethercote [:njn] 2011-11-20 20:11:43 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d052a4d8f2b
Comment 7 Matt Brubeck (:mbrubeck) 2011-11-21 09:05:38 PST
https://hg.mozilla.org/mozilla-central/rev/5d052a4d8f2b

Note You need to log in before you can comment on or make changes to this bug.