diff options
author | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 00:03:00 +0000 |
---|---|---|
committer | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 00:03:00 +0000 |
commit | 6a186346bcd8c0497ead0cae919b21e87df173c8 (patch) | |
tree | 7469ce0588d3b19c3a8d97b637fe6d23ba380978 | |
parent | c6c0fa943799e9a8c3de16ea1c5f44686ef6b912 (diff) | |
download | chromium_src-6a186346bcd8c0497ead0cae919b21e87df173c8.zip chromium_src-6a186346bcd8c0497ead0cae919b21e87df173c8.tar.gz chromium_src-6a186346bcd8c0497ead0cae919b21e87df173c8.tar.bz2 |
Fix GCC 4.3.4 Release build failure due to warning about potentially uninitialized variable. (It's actually guaranteed to be initialized, but the code made that hard for the compiler to infer.)
TEST=built on Linux with GCC 4.3.4
BUG=none
Review URL: http://codereview.chromium.org/3750019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62994 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | o3d/import/cross/zip_archive.cc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/o3d/import/cross/zip_archive.cc b/o3d/import/cross/zip_archive.cc index a71d7d4..1baf996 100644 --- a/o3d/import/cross/zip_archive.cc +++ b/o3d/import/cross/zip_archive.cc @@ -711,19 +711,17 @@ void ZipFileInfo::Print(bool print_header) { const char *string_method; if (compression_method == 0) { string_method = "Stored"; - } else { - if (compression_method == Z_DEFLATED) { - uInt iLevel = (uInt)((flag & 0x6) / 2); - if (iLevel == 0) { - string_method = "Defl:N"; - } else if (iLevel == 1) { - string_method = "Defl:X"; - } else if ((iLevel == 2) || (iLevel == 3)) { - string_method = "Defl:F"; // 2:fast , 3 : extra fast - } - } else { - string_method = "Unkn. "; + } else if (compression_method == Z_DEFLATED) { + uInt iLevel = (uInt)((flag & 0x6) / 2); + if (iLevel == 0) { + string_method = "Defl:N"; + } else if (iLevel == 1) { + string_method = "Defl:X"; + } else { // i.e., ((iLevel == 2) || (iLevel == 3)) + string_method = "Defl:F"; // 2:fast , 3 : extra fast } + } else { + string_method = "Unkn. "; } printf("%7lu %6s%c%7lu %3lu%% %2.2lu-%2.2lu-%2.2lu " |