diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-24 04:09:38 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-24 04:09:38 +0000 |
commit | 1b3fe67512ed4b98e81b1346ddb1474f090ce7ad (patch) | |
tree | 6be52dd2339a4d9a79736cf330ddc750ed253510 /skia/ext | |
parent | 38488e1d17404c5831b1eca6724af6421d0838de (diff) | |
download | chromium_src-1b3fe67512ed4b98e81b1346ddb1474f090ce7ad.zip chromium_src-1b3fe67512ed4b98e81b1346ddb1474f090ce7ad.tar.gz chromium_src-1b3fe67512ed4b98e81b1346ddb1474f090ce7ad.tar.bz2 |
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
Diffstat (limited to 'skia/ext')
-rw-r--r-- | skia/ext/image_operations.cc | 4 | ||||
-rw-r--r-- | skia/ext/image_operations_unittest.cc | 5 |
2 files changed, 6 insertions, 3 deletions
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; diff --git a/skia/ext/image_operations_unittest.cc b/skia/ext/image_operations_unittest.cc index d25752f..f81363c 100644 --- a/skia/ext/image_operations_unittest.cc +++ b/skia/ext/image_operations_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,6 +7,7 @@ #include <vector> #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "base/file_util.h" #include "base/string_util.h" #include "skia/ext/image_operations.h" @@ -537,7 +538,7 @@ TEST(ImageOperations, ResizeShouldAverageColors) { // For each method, downscale by 16 in each dimension, // and check each tested pixel against the expected average color. - bool all_methods_ok = true; + bool all_methods_ok ALLOW_UNUSED = true; for (size_t method_index = 0; method_index < arraysize(tested_methods); |