Skip to content

Commit 11d4fb4

Browse files
committed
Address some lints with SQLite code warnings
Warnings about conversions and possibly uninit parameters.
1 parent 794a440 commit 11d4fb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CppSQLite3.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ sqlite3_stmt *CppSQLite3DB::compile(const char *szSQL) {
12221222
** string, excluding the "\000" terminator.
12231223
*/
12241224
int sqlite3_encode_binary(const unsigned char *in, int n, unsigned char *out) {
1225-
int i, j, e, m;
1225+
int i, j, e = 0, m;
12261226
int cnt[256];
12271227
if (n <= 0) {
12281228
out[0] = 'x';
@@ -1294,7 +1294,7 @@ int sqlite3_decode_binary(const unsigned char *in, unsigned char *out) {
12941294
return -1;
12951295
}
12961296
}
1297-
out[i++] = (c + e) & 0xff;
1297+
out[i++] = static_cast<unsigned char>((c + e) & 0xff);
12981298
}
12991299
return i;
13001300
}

0 commit comments

Comments
 (0)