Ticket #650 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

Update sqlite3

Reported by: baker Owned by: somebody
Priority: trivial Milestone: All Platforms
Component: ALL modules Version: 7.10
Keywords: sqlite3 Cc:


gcc warns that sqllite3 has an unused variable, sqlite3one:

gcc -c -g -D_REENTRANT -m32 -g -D_DARWIN_USE_64_BIT_INODE -D_DARWIN_C_SOURCE -D_MACOSX -D_INTEL -D_USE_PTHREADS -D_USE_SCHED -I/Users/baker/Desktop/Software/Earthworm/earthworm-7.10-7376/include -D_GFORTRAN -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-pragmas -Wformat sqlite3.c
sqlite3.c:9117:26: warning: unused variable 'sqlite3one' [-Wunused-const-variable]
SQLITE_PRIVATE const int sqlite3one = 1;
1 warning generated.

sqlite3one is only referenced when the endian order cannot be determined at compile time. That is not the case. Thus, sqlite3one is never used and is not needed.

I downloaded the current sqlite3 release, https://www.sqlite.org/2018/sqlite-amalgamation-3230100.zip, and compiled that. The current sqlite3 release fixes this problem by moving the declaration of sqlite3one where it belongs inside the proper preprocessor conditional.

The sqlite3 release,, in Earthworm is several years old. I recommend sqlite3 be updated to the current release, 3.23.1, in time for the Earthworm 7.10 release.

Change History

comment:1 Changed 9 months ago by baker

I also noticed in the current sqlite3 that there are additions for 64-bit environments and at least one bug that looked to be cured by using 64-bit ints in place of 32-bit ints.

sqlite3 looks to be very professionally developed and extensively tested. I think it is worth keeping the Earthworm copy of sqlite3 up to date.

comment:2 Changed 9 months ago by paulf

Good catch Larry! Please go ahead and upgrade the library if you have time..

Note that sqlite is used by 2 modules: wave_serverV and the ark2arc module in the data_exchange/pdl2ew codes.


comment:3 Changed 9 months ago by baker

I will download and update the Earthworm sqlite3.

I do not expect there are any API changes, so the existing wave_serverV and the ark2arc modules should be fine. However, I do not have the ability to verify that.

Is there a README somewhere that I can edit to document the upstream source of the code? I'll add the URL, version number, and date accessed for reference.

comment:4 Changed 9 months ago by baker

  • Status changed from new to closed
  • Resolution set to fixed

SQLite3 has been upgraded to version 3.23.1 from https://www.sqlite.org/2018/sqlite-amalgamation-3230100.zip.

Fixed in r7380.

Note: See TracTickets for help on using tickets.