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...
Product: Core
Classification: Components
Component: General (show other bugs)
: unspecified
: All All
-- minor (vote)
: mozilla12
Assigned To: Jeff Walden [:Waldo] (remove +bmo to email)
Depends on:
  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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

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

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:
Comment 1 User image Daniel Holbert [:dholbert] 2011-12-30 22:53:50 PST
Comment on attachment 585112 [details] [diff] [review]

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 User image Jeff Walden [:Waldo] (remove +bmo to email) 2012-01-01 16:54:52 PST

Rubber-stamp territory, seems to me.  :-)
Comment 3 User image Phil Ringnalda (:philor) 2012-01-01 21:04:00 PST

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