1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Date: Tue, 21 Jan 2025 22:34:13 +0100
Subject: Fix incompatible pointer compilation error
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Fix the following error:
sqliteodbc.c:2946:24: error: assignment to ‘void (*)(void)’
from incompatible pointer type ‘void (*)(char **)’
[-Wincompatible-pointer-types]
2946 | s->rowfree = freerows;
| ^
sqliteodbc.c:1313:1: note: ‘freerows’ declared here
1313 | freerows(char **rowp)
| ^~~~~~~~
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Origin: Fedora
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097926
---
sqlite3odbc.c | 4 ++--
sqlite3odbc.h | 2 +-
sqlite4odbc.h | 2 +-
sqliteodbc.c | 4 ++--
sqliteodbc.h | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sqlite3odbc.c b/sqlite3odbc.c
index 5f5959d..9b001ad 100644
--- a/sqlite3odbc.c
+++ b/sqlite3odbc.c
@@ -14835,7 +14835,7 @@ drvtables(SQLHSTMT stmt,
#ifdef MEMORY_DEBUG
s->rowfree = xfree__;
#else
- s->rowfree = sqlite3_free;
+ s->rowfree = sqlite3_free_table;
#endif
s->nrows = 2;
s->rowp = s->rowprs = -1;
@@ -15918,7 +15918,7 @@ drvgettypeinfo(SQLHSTMT stmt, SQLSMALLINT sqltype)
#ifdef MEMORY_DEBUG
s->rowfree = xfree__;
#else
- s->rowfree = sqlite3_free;
+ s->rowfree = sqlite3_free_table;
#endif
memset(s->rows, 0, sizeof (char *) * (s->nrows + 1) * asize);
if (sqltype == SQL_ALL_TYPES) {
diff --git a/sqlite3odbc.h b/sqlite3odbc.h
index ae7acd0..f398ad5 100644
--- a/sqlite3odbc.h
+++ b/sqlite3odbc.h
@@ -256,7 +256,7 @@ typedef struct stmt {
int rowp; /**< Current result row */
int rowprs; /**< Current start row of rowset */
char **rows; /**< 2-dim array, result set */
- void (*rowfree)(); /**< Free function for rows */
+ void (*rowfree)(char **); /**< Free function for rows */
int naterr; /**< Native error code */
char sqlstate[6]; /**< SQL state for SQLError() */
SQLCHAR logmsg[1024]; /**< Message for SQLError() */
diff --git a/sqlite4odbc.h b/sqlite4odbc.h
index ad42ce6..79917e0 100644
--- a/sqlite4odbc.h
+++ b/sqlite4odbc.h
@@ -252,7 +252,7 @@ typedef struct stmt {
int rowp; /**< Current result row */
int rowprs; /**< Current start row of rowset */
char **rows; /**< 2-dim array, result set */
- void (*rowfree)(); /**< Free function for rows */
+ void (*rowfree)(char **); /**< Free function for rows */
int naterr; /**< Native error code */
char sqlstate[6]; /**< SQL state for SQLError() */
SQLCHAR logmsg[1024]; /**< Message for SQLError() */
diff --git a/sqliteodbc.c b/sqliteodbc.c
index 055dba2..ad30b4a 100644
--- a/sqliteodbc.c
+++ b/sqliteodbc.c
@@ -11299,7 +11299,7 @@ drvtables(SQLHSTMT stmt,
#ifdef MEMORY_DEBUG
s->rowfree = xfree__;
#else
- s->rowfree = free;
+ s->rowfree = freerows;
#endif
s->nrows = 2;
s->rowp = -1;
@@ -12267,7 +12267,7 @@ drvgettypeinfo(SQLHSTMT stmt, SQLSMALLINT sqltype)
#ifdef MEMORY_DEBUG
s->rowfree = xfree__;
#else
- s->rowfree = free;
+ s->rowfree = freerows;
#endif
memset(s->rows, 0, sizeof (char *) * (s->nrows + 1) * asize);
if (sqltype == SQL_ALL_TYPES) {
diff --git a/sqliteodbc.h b/sqliteodbc.h
index c15be02..61af597 100644
--- a/sqliteodbc.h
+++ b/sqliteodbc.h
@@ -252,7 +252,7 @@ typedef struct stmt {
int nrows; /**< Number of result rows */
int rowp; /**< Current result row */
char **rows; /**< 2-dim array, result set */
- void (*rowfree)(); /**< Free function for rows */
+ void (*rowfree)(char **); /**< Free function for rows */
int naterr; /**< Native error code */
char sqlstate[6]; /**< SQL state for SQLError() */
SQLCHAR logmsg[1024]; /**< Message for SQLError() */
|