summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 00:27:59 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 00:27:59 +0000
commitf68b7fa0fc9b002a9db4d499cc7e0c7c7636be8a (patch)
tree577a7ebc1ff17435da2abd44fd391ca928857b0a /webkit
parentdaba9ebc9d294a645e5569617628a73289755311 (diff)
downloadchromium_src-f68b7fa0fc9b002a9db4d499cc7e0c7c7636be8a.zip
chromium_src-f68b7fa0fc9b002a9db4d499cc7e0c7c7636be8a.tar.gz
chromium_src-f68b7fa0fc9b002a9db4d499cc7e0c7c7636be8a.tar.bz2
Fix possible uninitialized variable if all frames in the .ico are smaller than the desired size.
This makes the code a little more readable anyway. BUG=none TEST=none Review URL: http://codereview.chromium.org/164262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/api/src/WebImageSkia.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/webkit/api/src/WebImageSkia.cpp b/webkit/api/src/WebImageSkia.cpp
index 0bba7ae..3d684a7 100644
--- a/webkit/api/src/WebImageSkia.cpp
+++ b/webkit/api/src/WebImageSkia.cpp
@@ -56,7 +56,7 @@ WebImage WebImage::fromData(const WebData& data, const WebSize& desiredSize)
// Pick the frame closest to |desiredSize|'s area without being smaller,
// which has the highest bit depth.
const size_t frameCount = source.frameCount();
- size_t index;
+ size_t index = 0; // Default to first frame if none are large enough.
int frameAreaAtIndex;
for (size_t i = 0; i < frameCount; ++i) {
const IntSize frameSize = source.frameSizeAtIndex(i);