Last Comment Bug 700992 - Fix GCC compile warnings in XPConnect
: Fix GCC compile warnings in XPConnect
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: Nicholas Nethercote [:njn]
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

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

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 (PTO through June 13) 2011-11-09 05:04:49 PST
Comment on attachment 573157 [details] [diff] [review]

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

Comment 6 Nicholas Nethercote [:njn] 2011-11-20 20:11:43 PST
Comment 7 Matt Brubeck (:mbrubeck) 2011-11-21 09:05:38 PST

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