mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-08 19:00:27 +00:00
Add fix for GCC 11+ (reapply 06f9a5b6
)
This commit is contained in:
parent
d5f6ad13cf
commit
f5be9bd3cf
3 changed files with 15 additions and 2 deletions
8
third_party/sqlite3/build.c
vendored
8
third_party/sqlite3/build.c
vendored
|
@ -24,6 +24,12 @@
|
||||||
*/
|
*/
|
||||||
#include "third_party/sqlite3/sqliteInt.h"
|
#include "third_party/sqlite3/sqliteInt.h"
|
||||||
|
|
||||||
|
#if __GNUC__ >= 11
|
||||||
|
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* clang-format off */
|
||||||
|
|
||||||
#ifndef SQLITE_OMIT_SHARED_CACHE
|
#ifndef SQLITE_OMIT_SHARED_CACHE
|
||||||
/*
|
/*
|
||||||
** The TableLock structure is only used by the sqlite3TableLock() and
|
** The TableLock structure is only used by the sqlite3TableLock() and
|
||||||
|
@ -4536,7 +4542,7 @@ void sqlite3DefaultRowEst(Index *pIdx){
|
||||||
if( x<99 ){
|
if( x<99 ){
|
||||||
pIdx->pTable->nRowLogEst = 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;
|
a[0] = x;
|
||||||
|
|
||||||
/* Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is
|
/* Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is
|
||||||
|
|
5
third_party/sqlite3/fts5.c
vendored
5
third_party/sqlite3/fts5.c
vendored
|
@ -14307,10 +14307,13 @@ static int sqlite3Fts5IndexQuery(
|
||||||
/* If the QUERY_SCAN flag is set, all other flags must be clear. */
|
/* If the QUERY_SCAN flag is set, all other flags must be clear. */
|
||||||
assert( (flags & FTS5INDEX_QUERY_SCAN)==0 || flags==FTS5INDEX_QUERY_SCAN );
|
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 ){
|
if( sqlite3Fts5BufferSize(&p->rc, &buf, nToken+1)==0 ){
|
||||||
int iIdx = 0; /* Index to search */
|
int iIdx = 0; /* Index to search */
|
||||||
int iPrefixIdx = 0; /* +1 prefix index */
|
int iPrefixIdx = 0; /* +1 prefix index */
|
||||||
if( nToken>0 ) 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
|
/* 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
|
** is a prefix query for which there is no prefix index, set iIdx to
|
||||||
|
|
4
third_party/sqlite3/where.c
vendored
4
third_party/sqlite3/where.c
vendored
|
@ -19,6 +19,10 @@
|
||||||
#include "third_party/sqlite3/sqliteInt.h"
|
#include "third_party/sqlite3/sqliteInt.h"
|
||||||
#include "third_party/sqlite3/whereInt.h"
|
#include "third_party/sqlite3/whereInt.h"
|
||||||
|
|
||||||
|
#if __GNUC__ >= 11
|
||||||
|
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Extra information appended to the end of sqlite3_index_info but not
|
** Extra information appended to the end of sqlite3_index_info but not
|
||||||
** visible to the xBestIndex function, at least not directly. The
|
** visible to the xBestIndex function, at least not directly. The
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue