mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix GCC-isms and compiler warnings introduced by recent check-ins
[c56092507c967230] and [6e57848fe1e0e2b5]. FossilOrigin-Name: 91102c04375f83cffcd0f3204870e476636f651710e9e6fb773cf74085ef7636
This commit is contained in:
@ -54,7 +54,6 @@ void sqlite3HashClear(Hash *pH){
|
||||
*/
|
||||
static unsigned int strHash(const char *z){
|
||||
unsigned int h = 0;
|
||||
unsigned char c;
|
||||
while( z[0] ){ /*OPTIMIZATION-IF-TRUE*/
|
||||
/* Knuth multiplicative hashing. (Sorting & Searching, p. 510).
|
||||
** 0x9e3779b1 is 2654435761 which is the closest prime number to
|
||||
@ -159,7 +158,7 @@ static HashElem *findElementWithHash(
|
||||
HashElem *elem; /* Used to loop thru the element list */
|
||||
unsigned int count; /* Number of elements left to test */
|
||||
unsigned int h; /* The computed hash */
|
||||
static HashElem nullElement = { 0, 0, 0, 0 };
|
||||
static HashElem nullElement = { 0, 0, 0, 0, 0 };
|
||||
|
||||
h = strHash(pKey);
|
||||
if( pH->ht ){ /*OPTIMIZATION-IF-TRUE*/
|
||||
|
@ -843,6 +843,11 @@ typedef INT16_TYPE i16; /* 2-byte signed integer */
|
||||
typedef UINT8_TYPE u8; /* 1-byte unsigned integer */
|
||||
typedef INT8_TYPE i8; /* 1-byte signed integer */
|
||||
|
||||
/* A bitfield type for use inside of structures. Always follow with :N where
|
||||
** N is the number of bits.
|
||||
*/
|
||||
typedef unsigned bft; /* Bit Field Type */
|
||||
|
||||
/*
|
||||
** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value
|
||||
** that can be stored in a u32 without loss of data. The value
|
||||
@ -3845,10 +3850,10 @@ struct Parse {
|
||||
u8 isCreate; /* CREATE TABLE, INDEX, or VIEW (but not TRIGGER)
|
||||
** and ALTER TABLE ADD COLUMN. */
|
||||
#endif
|
||||
u8 colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */
|
||||
u8 bHasWith :1; /* True if statement contains WITH */
|
||||
u8 okConstFactor :1; /* OK to factor out constants */
|
||||
u8 checkSchema :1; /* Causes schema cookie check after an error */
|
||||
bft colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */
|
||||
bft bHasWith :1; /* True if statement contains WITH */
|
||||
bft okConstFactor :1; /* OK to factor out constants */
|
||||
bft checkSchema :1; /* Causes schema cookie check after an error */
|
||||
int nRangeReg; /* Size of the temporary register block */
|
||||
int iRangeReg; /* First register in temporary register block */
|
||||
int nErr; /* Number of errors seen */
|
||||
|
@ -398,10 +398,6 @@ struct sqlite3_context {
|
||||
sqlite3_value *argv[1]; /* Argument set */
|
||||
};
|
||||
|
||||
/* A bitfield type for use inside of structures. Always follow with :N where
|
||||
** N is the number of bits.
|
||||
*/
|
||||
typedef unsigned bft; /* Bit Field Type */
|
||||
|
||||
/* The ScanStatus object holds a single value for the
|
||||
** sqlite3_stmt_scanstatus() interface.
|
||||
|
Reference in New Issue
Block a user