SQLite Forum

Minor Warning compiling SQlite 3.35.5 warning with GCC 11
Login

Minor Warning compiling SQlite 3.35.5 warning with GCC 11

(1) By anonymous on 2021-05-14 07:00:18 [source]

Hello,
I have these warning with GCC11
(I installed package gcc-11 on ubuntu 21.04)

sqlite/sqlite3.c: In function ‘sqlite3DefaultRowEst’:
sqlite/sqlite3.c:115810:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
115810 |   if( pIdx->pPartIdxWhere!=0 ) x -= 10;  assert( 10==sqlite3LogEst(2) );
       |   ^~
In file included from sqlite/sqlite3.c:14233:
sqlite/sqlite3.c:115810:42: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
115810 |   if( pIdx->pPartIdxWhere!=0 ) x -= 10;  assert( 10==sqlite3LogEst(2) );
       |                                          ^~~~~~
sqlite/sqlite3.c: In function ‘whereSortingCost’:
sqlite/sqlite3.c:152431:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
152431 |     if( nRow>10 ) nRow -= 10;  assert( 10==sqlite3LogEst(2) );
       |     ^~
In file included from sqlite/sqlite3.c:14233:
sqlite/sqlite3.c:152431:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
152431 |     if( nRow>10 ) nRow -= 10;  assert( 10==sqlite3LogEst(2) );
       |                                ^~~~~~

(2) By Richard Hipp (drh) on 2021-05-14 11:26:41 in reply to 1 [link] [source]

Did you try this on the Pre-release Snapshot on the download page? Have these harmless warnings been fixed?

(3) By anonymous on 2021-05-14 19:35:06 in reply to 2 [link] [source]

this is fixed, thank.

Gilles Vollant