Fossil SCM
Give sqlcmd_autoinit() the signature that SQLite calls an automatic extension with. The undefined behavior sanitizer of Clang reports the call through a pointer to a different function type.
Commit
4af860df3834d77e56d6ab8a0f62a106f067f050c84146e38e84c0a406c81241
Parent
d2e8a7f16814b5e…
1 file changed
+2
-2
+2
-2
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -210,12 +210,12 @@ | ||
| 210 | 210 | ** the connection to the repository database is opened. Set up the |
| 211 | 211 | ** database connection to be more useful to the human operator. |
| 212 | 212 | */ |
| 213 | 213 | static int sqlcmd_autoinit( |
| 214 | 214 | sqlite3 *db, |
| 215 | - const char **pzErrMsg, | |
| 216 | - const void *notUsed | |
| 215 | + char **pzErrMsg, | |
| 216 | + const sqlite3_api_routines *notUsed | |
| 217 | 217 | ){ |
| 218 | 218 | int mTrace = SQLITE_TRACE_CLOSE; |
| 219 | 219 | add_content_sql_commands(db); |
| 220 | 220 | db_add_aux_functions(db); |
| 221 | 221 | re_add_sql_func(db); |
| 222 | 222 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -210,12 +210,12 @@ | |
| 210 | ** the connection to the repository database is opened. Set up the |
| 211 | ** database connection to be more useful to the human operator. |
| 212 | */ |
| 213 | static int sqlcmd_autoinit( |
| 214 | sqlite3 *db, |
| 215 | const char **pzErrMsg, |
| 216 | const void *notUsed |
| 217 | ){ |
| 218 | int mTrace = SQLITE_TRACE_CLOSE; |
| 219 | add_content_sql_commands(db); |
| 220 | db_add_aux_functions(db); |
| 221 | re_add_sql_func(db); |
| 222 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -210,12 +210,12 @@ | |
| 210 | ** the connection to the repository database is opened. Set up the |
| 211 | ** database connection to be more useful to the human operator. |
| 212 | */ |
| 213 | static int sqlcmd_autoinit( |
| 214 | sqlite3 *db, |
| 215 | char **pzErrMsg, |
| 216 | const sqlite3_api_routines *notUsed |
| 217 | ){ |
| 218 | int mTrace = SQLITE_TRACE_CLOSE; |
| 219 | add_content_sql_commands(db); |
| 220 | db_add_aux_functions(db); |
| 221 | re_add_sql_func(db); |
| 222 |