Get repository to build with GCC 11

See #594
This commit is contained in:
Justine Tunney 2022-09-13 04:14:20 -07:00
parent 446a1f7c5a
commit 06f9a5b627
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
34 changed files with 115 additions and 51 deletions

View file

@ -24,6 +24,10 @@
*/
#include "third_party/sqlite3/sqliteInt.inc"
#if __GNUC__ >= 11
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#endif
/* clang-format off */
#ifndef SQLITE_OMIT_SHARED_CACHE
@ -4230,7 +4234,7 @@ void sqlite3DefaultRowEst(Index *pIdx){
if( x<99 ){
pIdx->pTable->nRowLogEst = x = 99;
}
if( pIdx->pPartIdxWhere!=0 ) x -= 10; assert( 10==sqlite3LogEst(2) );
if( pIdx->pPartIdxWhere!=0 ) x -= 10; /*assert( 10==sqlite3LogEst(2) );*/
a[0] = x;
/* Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is

View file

@ -14170,10 +14170,13 @@ static int sqlite3Fts5IndexQuery(
/* If the QUERY_SCAN flag is set, all other flags must be clear. */
assert( (flags & FTS5INDEX_QUERY_SCAN)==0 || flags==FTS5INDEX_QUERY_SCAN );
/* [jart] what is with these gcc11 warnings */
void *MemCpy(void *, const void *, size_t) asm("memcpy");
if( sqlite3Fts5BufferSize(&p->rc, &buf, nToken+1)==0 ){
int iIdx = 0; /* Index to search */
int iPrefixIdx = 0; /* +1 prefix index */
if( nToken ) memcpy(&buf.p[1], pToken, nToken);
if( nToken ) MemCpy(&buf.p[1], pToken, nToken);
/* Figure out which index to search and set iIdx accordingly. If this
** is a prefix query for which there is no prefix index, set iIdx to

View file

@ -20,6 +20,10 @@
#include "third_party/sqlite3/whereInt.inc"
/* clang-format off */
#if __GNUC__ >= 11
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#endif
/*
** Extra information appended to the end of sqlite3_index_info but not
** visible to the xBestIndex function, at least not directly. The