Bo Lindbergh 2bfjdsla52kztwejndzdstsxl9athp at gmail.com
Tue Dec 22 16:16:32 UTC 2020

Quoth Julien ÉLIE <julien at trigofacile.com>:
> I'm now encountering two shift-negative-value errors (building with "make warnings"):
> ovsqlite/ovsqlite-server.c: Dans la fonction « pack_length »:
> ovsqlite/ovsqlite-server.c:482:27: erreur: décalage vers la gauche d'une valeur négative [-Werror=shift-negative-value]
>  482 |     *--walk = length | (~0<<(9-lenlen));
>      |                           ^~
> ovsqlite/ovsqlite-server.c: Dans la fonction « unpack_length »:
> ovsqlite/ovsqlite-server.c:501:20: erreur: décalage vers la gauche d'une valeur négative [-Werror=shift-negative-value]
>  501 |     length = c&~(~0<<(8-lenlen));
>      |                    ^~

Marking some constants as unsigned should fix that
(included in the attached patch).

> ovsqlite/ovsqlite-server.c: Dans la fonction « open_db »:
> ovsqlite/ovsqlite-server.c:591:9: erreur: « SQLITE_PREPARE_PERSISTENT » non déclaré (première utilisation dans cette fonction)
>      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
> For this last one, it seems that SQLITE_PREPARE_PERSISTENT was introduced in SQLite 3.20.0.
> Should INN require that recent version (August 2017) at configure time?
> Or #if SQLITE_VERSION_NUMBER >= 3020000 added there?
> And also around sqlite3_prepare_v3 in sqlite-helper.c and use sqlite3_prepare_v2 before 3.20.0?

The prepare flags argument is useful but not essential.  Don't change
the version requirement; add workarounds to sqlite-helper.[ch]
(patch attached).

> If I do not take into account the first 2 warnings, and manually use sqlite3_prepare_v2, the remaining of the build works fine with SQLite from Debian Jessie.  Good news!

The minimum version requirement is based only on SQL language features.
I ought to download SQLite 3.8.2 and test against it at some point.

/Bo Lindbergh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: delta2.diff.gz
Type: application/x-gzip
Size: 828 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20201222/92b086df/attachment.bin>

More information about the inn-workers mailing list