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

VERIFIED FIXED in mozilla7

Status

()

Core
Graphics
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: RyanVM, Assigned: RyanVM)

Tracking

Trunk
mozilla7
x86
Windows 7
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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 :).
(Assignee)

Comment 2

6 years ago
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.
(Assignee)

Comment 4

6 years ago
Created attachment 542332 [details] [diff] [review]
Patch
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+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/93ad15ba19d5
Flags: in-testsuite-
Keywords: checkin-needed
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
http://hg.mozilla.org/mozilla-central/rev/93ad15ba19d5
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 8

6 years ago
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.