Last Comment Bug 714422 - Silence 271 warnings due to GetCurrentProcessArchitecture being a *static* inline, never used, when building with clang
: Silence 271 warnings due to GetCurrentProcessArchitecture being a *static* in...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: General (show other bugs)
: unspecified
: All All
: -- minor (vote)
: mozilla12
Assigned To: Jeff Walden [:Waldo] (remove +bmo to email)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-30 21:51 PST by Jeff Walden [:Waldo] (remove +bmo to email)
Modified: 2012-01-01 21:04 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (693 bytes, patch)
2011-12-30 21:51 PST, Jeff Walden [:Waldo] (remove +bmo to email)
dholbert: review+
Details | Diff | Splinter Review

Description Jeff Walden [:Waldo] (remove +bmo to email) 2011-12-30 21:51:38 PST
Created attachment 585112 [details] [diff] [review]
Patch

I suspect whoever wrote the current code this way was a C programmer, because C's inline specifier is weird, generally requiring either extern/static on such declarations.  In C++ there's no weirdness to inline, I think at least partly due to the One Definition Rule.  This is a C++ header (see the <map>/<string>/<vector> includes), so just get rid of "static" entirely.

More fun with the topic here, if you're interested in knowing more:

http://adamrosenfield.com/blog/2011/03/21/the-tricky-inline-specifier-in-c99/
Comment 1 Daniel Holbert [:dholbert] 2011-12-30 22:53:50 PST
Comment on attachment 585112 [details] [diff] [review]
Patch

Makes sense.

I don't have any ownership over /ipc so I don't feel qualified to "sign off" on changes to it.  But if you're just looking for a sanity-check/rubber-stamp, consider that granted. :)  I'll leave it to your judgement as to whether it's worth it to also r? someone who was involved with importing this code.  (probably unnecessary)

(Thanks for the link, too! Interesting to learn about that quirk of "inline" in C.)
Comment 2 Jeff Walden [:Waldo] (remove +bmo to email) 2012-01-01 16:54:52 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/5f179b135d4c

Rubber-stamp territory, seems to me.  :-)
Comment 3 Phil Ringnalda (:philor) 2012-01-01 21:04:00 PST
https://hg.mozilla.org/mozilla-central/rev/5f179b135d4c

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