diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-18 01:40:47 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-18 01:40:47 +0000 |
commit | 481c3e82e2dcbcb676501f18bc8f58900071b935 (patch) | |
tree | b41b70589f0b082edffa7322b1c06af23c4b32bc /sql | |
parent | cf85b9ad701b8363e3d1d54d54390dcdf4a45291 (diff) | |
download | chromium_src-481c3e82e2dcbcb676501f18bc8f58900071b935.zip chromium_src-481c3e82e2dcbcb676501f18bc8f58900071b935.tar.gz chromium_src-481c3e82e2dcbcb676501f18bc8f58900071b935.tar.bz2 |
Fixes for re-enabling more MSVC level 4 warnings: misc edition #2
This contains fixes for the following sorts of issues:
* Assignment inside conditional
* Taking the address of a temporary
* Octal escape sequence terminated by decimal number
* Signedness mismatch
* Possibly-uninitialized local variable
This also contains a small number of cleanups to nearby code (e.g. no else after return).
BUG=81439
TEST=none
Review URL: https://codereview.chromium.org/382673002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql')
-rw-r--r-- | sql/recovery.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/recovery.cc b/sql/recovery.cc index 42f1a9a..f9da407 100644 --- a/sql/recovery.cc +++ b/sql/recovery.cc @@ -355,7 +355,7 @@ bool Recovery::AutoRecoverTable(const char* table_name, // |rowid_decl| stores the ROWID version of the last INTEGER column // seen, which is at |rowid_ofs| in |create_column_decls|. size_t pk_column_count = 0; - size_t rowid_ofs; // Only valid if rowid_decl is set. + size_t rowid_ofs = 0; // Only valid if rowid_decl is set. std::string rowid_decl; // ROWID version of column |rowid_ofs|. while (s.Step()) { @@ -372,7 +372,7 @@ bool Recovery::AutoRecoverTable(const char* table_name, // (zero for not in primary key). I find that it is always 1 for // columns in the primary key. Since this code is very dependent on // that pragma, review if the implementation changes. - DCHECK_EQ(pk_column, 1); + DCHECK_EQ(1, pk_column); ++pk_column_count; } |