1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Explicitly initialize at least the first field of every struct. This is to work around compilers that don't like the syntax "struct XXX { ... } yyy = {};". (CVS 5666)

FossilOrigin-Name: 88bfdc87471e65ac5a262a794b8cdf3e563eb327
This commit is contained in:
danielk1977
2008-09-02 17:52:51 +00:00
parent 95e80d61af
commit 23bf0f41ea
6 changed files with 33 additions and 44 deletions

View File

@@ -12,7 +12,7 @@
**
** Memory allocation functions used throughout sqlite.
**
** $Id: malloc.c,v 1.39 2008/09/02 10:22:01 danielk1977 Exp $
** $Id: malloc.c,v 1.40 2008/09/02 17:52:52 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -77,6 +77,10 @@ int sqlite3_release_memory(int n){
** State information local to the memory allocation subsystem.
*/
static SQLITE_WSD struct Mem0Global {
/* Number of free pages for scratch and page-cache memory */
u32 nScratchFree;
u32 nPageFree;
sqlite3_mutex *mutex; /* Mutex to serialize access */
/*
@@ -98,11 +102,7 @@ static SQLITE_WSD struct Mem0Global {
*/
u32 *aScratchFree;
u32 *aPageFree;
/* Number of free pages for scratch and page-cache memory */
u32 nScratchFree;
u32 nPageFree;
} mem0 = {};
} mem0 = { 62560955 };
#define mem0 GLOBAL(struct Mem0Global, mem0)