diff options
author | drh <> | 2025-02-08 13:34:19 +0000 |
---|---|---|
committer | drh <> | 2025-02-08 13:34:19 +0000 |
commit | 03c65171b8ff533b28927a1e5fb7939b87077de0 (patch) | |
tree | 5245a471fd66626d6aab08f9524a0babf26ebc98 /src | |
parent | 297a95bad5a58fb9580b05aa46d14eca30914095 (diff) | |
download | sqlite-03c65171b8ff533b28927a1e5fb7939b87077de0.tar.gz sqlite-03c65171b8ff533b28927a1e5fb7939b87077de0.zip |
Fix GCC-isms and compiler warnings introduced by recent check-ins
[c56092507c967230] and [6e57848fe1e0e2b5].
FossilOrigin-Name: 91102c04375f83cffcd0f3204870e476636f651710e9e6fb773cf74085ef7636
Diffstat (limited to 'src')
-rw-r--r-- | src/hash.c | 3 | ||||
-rw-r--r-- | src/sqliteInt.h | 13 | ||||
-rw-r--r-- | src/vdbeInt.h | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/hash.c b/src/hash.c index c822cb5f1..8cc6c0966 100644 --- a/src/hash.c +++ b/src/hash.c @@ -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*/ diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 359ed1b6b..e46744a12 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -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 */ diff --git a/src/vdbeInt.h b/src/vdbeInt.h index ecc757dd0..12af82726 100644 --- a/src/vdbeInt.h +++ b/src/vdbeInt.h @@ -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. |