From 1b3fe67512ed4b98e81b1346ddb1474f090ce7ad Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Fri, 24 Feb 2012 04:09:38 +0000 Subject: Fix some gcc 4.6 compiler warnings in skia/ext. BUG=None Review URL: http://codereview.chromium.org/9456022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123431 0039d316-1c4b-4281-b951-d872f2087c98 --- skia/ext/image_operations.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'skia/ext/image_operations.cc') diff --git a/skia/ext/image_operations.cc b/skia/ext/image_operations.cc index b193ef9..22d262a 100644 --- a/skia/ext/image_operations.cc +++ b/skia/ext/image_operations.cc @@ -415,7 +415,7 @@ SkBitmap ImageOperations::ResizeSubpixel(const SkBitmap& source, uint32* src = src_row; uint32* dst = dst_row; for (int x = 0; x < dest_subset.width(); x++, src += w, dst++) { - uint8 r, g, b, a; + uint8 r = 0, g = 0, b = 0, a = 0; switch (order) { case SkFontHost::kRGB_LCDOrder: switch (orientation) { @@ -449,6 +449,8 @@ SkBitmap ImageOperations::ResizeSubpixel(const SkBitmap& source, break; } break; + case SkFontHost::kNONE_LCDOrder: + NOTREACHED(); } // Premultiplied alpha is very fragile. a = a > r ? a : r; -- cgit v1.1