Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsql-sqlite3: Fix xPrepareSql init in test8.c #1790

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

penberg
Copy link
Collaborator

@penberg penberg commented Oct 21, 2024

The module struct initializer for xPrepareSql is wrong since commit d178de8 ("bugfix: reset modifications of sqlite3_vtab (#1027)") because it assings the xPrepareSql as the xIntegrity hook:

/home/runner/work/libsql/libsql/libsql-sqlite3/src/test8.c:1364:3: warning: initialization of 'int (*)(sqlite3_vtab *, const char *, const char *, int,  char **)' from incompatible pointer type 'int (*)(sqlite3_vtab_cursor *, const char *)' [-Wincompatible-pointer-types]
 1364 |   echoPreparedSql,
      |   ^~~~~~~~~~~~~~~
/home/runner/work/libsql/libsql/libsql-sqlite3/src/test8.c:1364:3: note: (near initialization for 'echoModuleV2.xIntegrity')

The module struct initializer for xPrepareSql is wrong since commit
d178de8 ("bugfix: reset modifications of `sqlite3_vtab` (#1027)")
because it assings the xPrepareSql as the xIntegrity hook:

```
/home/runner/work/libsql/libsql/libsql-sqlite3/src/test8.c:1364:3: warning: initialization of 'int (*)(sqlite3_vtab *, const char *, const char *, int,  char **)' from incompatible pointer type 'int (*)(sqlite3_vtab_cursor *, const char *)' [-Wincompatible-pointer-types]
 1364 |   echoPreparedSql,
      |   ^~~~~~~~~~~~~~~
/home/runner/work/libsql/libsql/libsql-sqlite3/src/test8.c:1364:3: note: (near initialization for 'echoModuleV2.xIntegrity')
```
@penberg penberg enabled auto-merge October 21, 2024 12:01
@penberg penberg added this pull request to the merge queue Oct 21, 2024
Merged via the queue into main with commit 9ce06b7 Oct 21, 2024
19 checks passed
@penberg penberg deleted the fix-xprepare-sql-init branch October 21, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants