1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix harmless compiler warnings seen with MSVC 2015.

FossilOrigin-Name: d05becd873a03a366843a34e7f4c732dd8f88c86
This commit is contained in:
mistachkin
2015-04-19 21:43:16 +00:00
parent 1c89a7710e
commit 8e18922f12
15 changed files with 136 additions and 147 deletions

View File

@@ -211,15 +211,15 @@ static int faultsimInstall(int install){
faultsimBeginBenign, faultsimEndBenign
);
}else{
sqlite3_mem_methods m;
sqlite3_mem_methods m2;
assert(memfault.m.xMalloc);
/* One should be able to reset the default memory allocator by storing
** a zeroed allocator then calling GETMALLOC. */
memset(&m, 0, sizeof(m));
sqlite3_config(SQLITE_CONFIG_MALLOC, &m);
sqlite3_config(SQLITE_CONFIG_GETMALLOC, &m);
assert( memcmp(&m, &memfault.m, sizeof(m))==0 );
memset(&m2, 0, sizeof(m2));
sqlite3_config(SQLITE_CONFIG_MALLOC, &m2);
sqlite3_config(SQLITE_CONFIG_GETMALLOC, &m2);
assert( memcmp(&m2, &memfault.m, sizeof(m2))==0 );
rc = sqlite3_config(SQLITE_CONFIG_MALLOC, &memfault.m);
sqlite3_test_control(SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS, 0, 0);