Last Comment Bug 667663 - gfxwindowsplatform.cpp(506) : warning C4715: 'gfxWindowsPlatform::GetScaledFontForFont' : not all control paths return a value
: gfxwindowsplatform.cpp(506) : warning C4715: 'gfxWindowsPlatform::GetScaledFo...
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla7
Assigned To: Ryan VanderMeulen [:RyanVM]
: Milan Sreckovic [:milan]
Depends on:
Blocks: 651858
  Show dependency treegraph
Reported: 2011-06-27 16:22 PDT by Ryan VanderMeulen [:RyanVM]
Modified: 2011-07-07 07:20 PDT (History)
4 users (show)
Ms2ger: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (948 bytes, patch)
2011-06-27 17:10 PDT, Ryan VanderMeulen [:RyanVM]
bas: review+
Details | Diff | Splinter Review

Description Ryan VanderMeulen [:RyanVM] 2011-06-27 16:22:02 PDT
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.

Bas, what should be returned if DWrite is disabled?
Comment 1 Bas Schouten (:bas.schouten) 2011-06-27 16:54:38 PDT
If DWrite is disabled this will all break down, so NULL seems fine :).
Comment 2 Ryan VanderMeulen [:RyanVM] 2011-06-27 16:56:17 PDT
Out of curiosity, why use the if statement at all if the DWrite situation is the only one that can do something sane anyway?
Comment 3 Bas Schouten (:bas.schouten) 2011-06-27 16:57:04 PDT
To minimize churn on the function as we add more azure backends.
Comment 4 Ryan VanderMeulen [:RyanVM] 2011-06-27 17:10:39 PDT
Created attachment 542332 [details] [diff] [review]
Comment 5 Bas Schouten (:bas.schouten) 2011-06-27 17:13:26 PDT
Comment on attachment 542332 [details] [diff] [review]

Review of attachment 542332 [details] [diff] [review]:
Comment 7 Marco Bonardo [::mak] 2011-07-02 01:47:33 PDT
Comment 8 AndreiD[QA] 2011-07-07 07:20:32 PDT
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

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