1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +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

@@ -23,7 +23,7 @@
** This version of the memory allocation subsystem is included
** in the build only if SQLITE_ENABLE_MEMSYS3 is defined.
**
** $Id: mem3.c,v 1.22 2008/09/02 10:22:01 danielk1977 Exp $
** $Id: mem3.c,v 1.23 2008/09/02 17:52:52 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -100,6 +100,13 @@ struct Mem3Block {
** when this module is combined with other in the amalgamation.
*/
static SQLITE_WSD struct Mem3Global {
/*
** Memory available for allocation. nPool is the size of the array
** (in Mem3Blocks) pointed to by aPool less 2.
*/
u32 nPool;
Mem3Block *aPool;
/*
** True if we are evaluating an out-of-memory callback.
*/
@@ -131,14 +138,7 @@ static SQLITE_WSD struct Mem3Global {
*/
u32 aiSmall[MX_SMALL-1]; /* For sizes 2 through MX_SMALL, inclusive */
u32 aiHash[N_HASH]; /* For sizes MX_SMALL+1 and larger */
/*
** Memory available for allocation. nPool is the size of the array
** (in Mem3Blocks) pointed to by aPool less 2.
*/
u32 nPool;
Mem3Block *aPool;
} mem3 = {};
} mem3 = { 97535575 };
#define mem3 GLOBAL(struct Mem3Global, mem3)