From e02c8c355ee1dacb0c6ef2c5c5f885c7a4b44c33 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 24 Jan 2023 10:34:25 +0300 Subject: Backport commit c3f616597c40 (Due to a coding error, check-in [8efd61e8518594e3] did not actually use ...) Fixes misuse of the writeMask field of Parse which resulted in the 'address of array pParse->writeMask will always evaluate to true' warning. --- libsqlite3/README-DEV | 8 +++++++- libsqlite3/fix-writeMask-check.patch | 13 +++++++++++++ libsqlite3/libsqlite3/sqlite3.c | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 libsqlite3/fix-writeMask-check.patch (limited to 'libsqlite3') diff --git a/libsqlite3/README-DEV b/libsqlite3/README-DEV index a6f056f..86f7c79 100644 --- a/libsqlite3/README-DEV +++ b/libsqlite3/README-DEV @@ -13,8 +13,14 @@ Also fix warnings that pop up with -Wall: $ mv sqlite3.c sqlite3.c.orig $ cp sqlite3.c.orig sqlite3.c $ git apply ../fix-warnings.patch +$ git apply ../fix-writeMask-check.patch $ popd -Note that patches are produced by commands similar to the following: +Note that the fix-writeMask-check.patch patch is a backport of the +c3f616597c40 commit (as appears in the https://github.com/sqlite/sqlite +mirror). It shouldn't be required starting the release which will follow +3.40.1. + +Also note that patches are produced by commands similar to the following: $ git diff >fix-warnings.patch diff --git a/libsqlite3/fix-writeMask-check.patch b/libsqlite3/fix-writeMask-check.patch new file mode 100644 index 0000000..d5a0b76 --- /dev/null +++ b/libsqlite3/fix-writeMask-check.patch @@ -0,0 +1,13 @@ +diff --git a/libsqlite3/libsqlite3/sqlite3.c b/libsqlite3/libsqlite3/sqlite3.c +index 975f0c2..0ec45d0 100644 +--- a/libsqlite3/libsqlite3/sqlite3.c ++++ b/libsqlite3/libsqlite3/sqlite3.c +@@ -157893,7 +157893,7 @@ SQLITE_PRIVATE void sqlite3VtabUsesAllSchemas(sqlite3_index_info *pIdxInfo){ + for(i=0; iwriteMask ){ ++ if( DbMaskNonZero(pParse->writeMask) ){ + for(i=0; iwriteMask ){ + if( DbMaskNonZero(pParse->writeMask) ){ for(i=0; i