From 780297a034a947746c83d6cebe8ca559e38311c6 Mon Sep 17 00:00:00 2001 From: Oliver Stöneberg Date: Sun, 5 Apr 2015 09:51:59 +0200 Subject: fixed Visual Studio compiler warnings in sqlite3 when compiling with optimizations (nw) --- 3rdparty/sqlite3/sqlite3.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to '3rdparty/sqlite3/sqlite3.c') diff --git a/3rdparty/sqlite3/sqlite3.c b/3rdparty/sqlite3/sqlite3.c index eee15296b9d..04ab891c633 100644 --- a/3rdparty/sqlite3/sqlite3.c +++ b/3rdparty/sqlite3/sqlite3.c @@ -72821,6 +72821,9 @@ case OP_Found: { /* jump, in3 */ UnpackedRecord r; char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*4 + 7]; + // MAME: fixed Visual Studio warning about potentially uninitialized variable with optimizations enabled + memset(&r, 0x00, sizeof(UnpackedRecord)); + #ifdef SQLITE_TEST if( pOp->opcode!=OP_NoConflict ) sqlite3_found_count++; #endif @@ -93564,8 +93567,10 @@ SQLITE_PRIVATE void sqlite3DeleteFrom( WhereInfo *pWInfo; /* Information about the WHERE clause */ Index *pIdx; /* For looping over indices of the table */ int iTabCur; /* Cursor number for the table */ - int iDataCur; /* VDBE cursor for the canonical data source */ - int iIdxCur; /* Cursor number of the first index */ + // MAME: fixed Visual Studio warning about potentially uninitialized variable with optimizations enabled + int iDataCur = 0; /* VDBE cursor for the canonical data source */ + // MAME: fixed Visual Studio warning about potentially uninitialized variable with optimizations enabled + int iIdxCur = 0; /* Cursor number of the first index */ int nIdx; /* Number of indices */ sqlite3 *db; /* Main database structure */ AuthContext sContext; /* Authorization context */ -- cgit v1.2.3-70-g09d2