Closed Bug 667663 Opened 14 years ago Closed 14 years ago

gfxwindowsplatform.cpp(506) : warning C4715: 'gfxWindowsPlatform::GetScaledFontForFont' : not all control paths return a value

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla7

People

(Reporter: RyanVM, Assigned: RyanVM)

References

Details

(Whiteboard: [inbound])

Attachments

(1 file)

gfxwindowsplatform.cpp(506) : warning C4715: 'gfxWindowsPlatform::GetScaledFontForFont' : not all control paths return a value Looks like it's complaining because the function only returns a value inside the if condition. This code was added in bug 651858 part 2. http://hg.mozilla.org/mozilla-central/rev/95039cfae6a3 Bas, what should be returned if DWrite is disabled?
If DWrite is disabled this will all break down, so NULL seems fine :).
Out of curiosity, why use the if statement at all if the DWrite situation is the only one that can do something sane anyway?
To minimize churn on the function as we add more azure backends.
Attached patch PatchSplinter Review
Assignee: nobody → ryanvm
Status: NEW → ASSIGNED
Attachment #542332 - Flags: review?(bas.schouten)
Comment on attachment 542332 [details] [diff] [review] Patch Review of attachment 542332 [details] [diff] [review]: -----------------------------------------------------------------
Attachment #542332 - Flags: review?(bas.schouten) → review+
Keywords: checkin-needed
Flags: in-testsuite-
Keywords: checkin-needed
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a2) Gecko/20110706 Firefox/7.0a2 Verified fixed - detailed by the changeset in comment 7
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: