Closed Bug 817913 Opened 7 years ago Closed 7 years ago

shouldn't have static functions in GfxDriverInfo.h

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: heycam, Assigned: heycam)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I don't think it's a good idea to have static functions in GfxDriverInfo.h, as every translation unit that includes it (and uses them) gets its own copies.  It results in compiler warnings about the functions not being used in those translation units that they aren't.

I suggest doing either s/static/inline/ on them, or declaring them as non-inline functions and moving their implementations to the cpp file.
Attached patch patchSplinter Review
Make them inline.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #688061 - Flags: review?(bas)
Blocks: buildwarning
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Comment on attachment 688061 [details] [diff] [review]
patch

Review of attachment 688061 [details] [diff] [review]:
-----------------------------------------------------------------

Seems good to me! Are we sure this file never gets included from C-code? i.e. we don't need static inline?
Attachment #688061 - Flags: review?(bas) → review+
https://hg.mozilla.org/mozilla-central/rev/1d3c65ce01ad
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.