summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/connection.c3
-rw-r--r--Modules/_sqlite/cursor.c8
-rw-r--r--Modules/_sqlite/statement.c4
3 files changed, 4 insertions, 11 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index e4969e3..4bc16c3 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -673,7 +673,6 @@ void _pysqlite_final_callback(sqlite3_context* context)
{
PyObject* function_result = NULL;
PyObject** aggregate_instance;
- PyObject* aggregate_class;
#ifdef WITH_THREAD
PyGILState_STATE threadstate;
@@ -681,8 +680,6 @@ void _pysqlite_final_callback(sqlite3_context* context)
threadstate = PyGILState_Ensure();
#endif
- aggregate_class = (PyObject*)sqlite3_user_data(context);
-
aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, sizeof(PyObject*));
if (!*aggregate_instance) {
/* this branch is executed if there was an exception in the aggregate's
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index 97908a3..eb099c4 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -126,11 +126,9 @@ static int pysqlite_cursor_init(pysqlite_Cursor* self, PyObject* args, PyObject*
static void pysqlite_cursor_dealloc(pysqlite_Cursor* self)
{
- int rc;
-
/* Reset the statement if the user has not closed the cursor */
if (self->statement) {
- rc = pysqlite_statement_reset(self->statement);
+ pysqlite_statement_reset(self->statement);
Py_DECREF(self->statement);
}
@@ -529,7 +527,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
if (self->statement != NULL) {
/* There is an active statement */
- rc = pysqlite_statement_reset(self->statement);
+ pysqlite_statement_reset(self->statement);
}
operation_cstr = _PyUnicode_AsStringAndSize(operation, &operation_len);
@@ -734,7 +732,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
}
if (multiple) {
- rc = pysqlite_statement_reset(self->statement);
+ pysqlite_statement_reset(self->statement);
}
Py_XDECREF(parameters);
}
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
index f89fc9a..4e039c1 100644
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -369,11 +369,9 @@ void pysqlite_statement_mark_dirty(pysqlite_Statement* self)
void pysqlite_statement_dealloc(pysqlite_Statement* self)
{
- int rc;
-
if (self->st) {
Py_BEGIN_ALLOW_THREADS
- rc = sqlite3_finalize(self->st);
+ sqlite3_finalize(self->st);
Py_END_ALLOW_THREADS
}