aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontHost_win.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-12-04 12:01:30 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-04 19:29:51 +0000
commit1ef80942b3b2414c862eb1e9ae301442b447c089 (patch)
tree27eb42492497d3516a008d1f038ce044d2c16c94 /src/ports/SkFontHost_win.cpp
parent364c4c87c1321625ae961d8f2cf315096ccfd462 (diff)
turn on extended Clang warnings on Windows too
Plus some small rearrangements of the various warning lists. Change-Id: Ied58f940341d69ddab971a529fd01b1e96b65641 Reviewed-on: https://skia-review.googlesource.com/67720 Commit-Queue: Chris Dalton <csmartdalton@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/ports/SkFontHost_win.cpp')
-rw-r--r--src/ports/SkFontHost_win.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 9094d7e2a4..ef17ca8af5 100644
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -539,7 +539,7 @@ public:
SkScalerContext_GDI(sk_sp<LogFontTypeface>,
const SkScalerContextEffects&,
const SkDescriptor* desc);
- virtual ~SkScalerContext_GDI();
+ ~SkScalerContext_GDI() override;
// Returns true if the constructor was able to complete all of its
// initializations (which may include calling GDI).
@@ -821,7 +821,8 @@ uint16_t SkScalerContext_GDI::generateCharToGlyph(SkUnichar utf32) {
static const int numWCHAR = 2;
static const int maxItems = 2;
// MSDN states that this can be nullptr, but some things don't work then.
- SCRIPT_CONTROL sc = { 0 };
+ SCRIPT_CONTROL sc;
+ memset(&sc, 0, sizeof(sc));
// Add extra item to SCRIPT_ITEM to work around a bug (now documented).
// https://bugzilla.mozilla.org/show_bug.cgi?id=366643
SCRIPT_ITEM si[maxItems + 1];
@@ -1920,7 +1921,7 @@ SkStreamAsset* LogFontTypeface::onOpenStream(int* ttcIndex) const {
SkMemoryStream* stream = nullptr;
DWORD tables[2] = {kTTCTag, 0};
- for (int i = 0; i < SK_ARRAY_COUNT(tables); i++) {
+ for (size_t i = 0; i < SK_ARRAY_COUNT(tables); i++) {
DWORD bufferSize = GetFontData(hdc, tables[i], 0, nullptr, 0);
if (bufferSize == GDI_ERROR) {
call_ensure_accessible(lf);
@@ -1976,7 +1977,8 @@ static uint16_t nonBmpCharToGlyph(HDC hdc, SCRIPT_CACHE* scriptCache, const WCHA
static const int numWCHAR = 2;
static const int maxItems = 2;
// MSDN states that this can be nullptr, but some things don't work then.
- SCRIPT_CONTROL scriptControl = { 0 };
+ SCRIPT_CONTROL scriptControl;
+ memset(&scriptControl, 0, sizeof(scriptControl));
// Add extra item to SCRIPT_ITEM to work around a bug (now documented).
// https://bugzilla.mozilla.org/show_bug.cgi?id=366643
SCRIPT_ITEM si[maxItems + 1];