Skip to content

Commit 5e48e83

Browse files
author
Erlend Egeberg Aasland
authored
bpo-43294: Remove unused variables in pysqlite_connection_*() (GH-24658)
1 parent 7956ef8 commit 5e48e83

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Modules/_sqlite/connection.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,11 @@ int pysqlite_check_connection(pysqlite_Connection* con)
367367
PyObject* _pysqlite_connection_begin(pysqlite_Connection* self)
368368
{
369369
int rc;
370-
const char* tail;
371370
sqlite3_stmt* statement;
372371

373372
Py_BEGIN_ALLOW_THREADS
374-
rc = sqlite3_prepare_v2(self->db, self->begin_statement, -1, &statement, &tail);
373+
rc = sqlite3_prepare_v2(self->db, self->begin_statement, -1, &statement,
374+
NULL);
375375
Py_END_ALLOW_THREADS
376376

377377
if (rc != SQLITE_OK) {
@@ -411,7 +411,6 @@ pysqlite_connection_commit_impl(pysqlite_Connection *self)
411411
/*[clinic end generated code: output=3da45579e89407f2 input=39c12c04dda276a8]*/
412412
{
413413
int rc;
414-
const char* tail;
415414
sqlite3_stmt* statement;
416415

417416
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
@@ -421,7 +420,7 @@ pysqlite_connection_commit_impl(pysqlite_Connection *self)
421420
if (!sqlite3_get_autocommit(self->db)) {
422421

423422
Py_BEGIN_ALLOW_THREADS
424-
rc = sqlite3_prepare_v2(self->db, "COMMIT", -1, &statement, &tail);
423+
rc = sqlite3_prepare_v2(self->db, "COMMIT", -1, &statement, NULL);
425424
Py_END_ALLOW_THREADS
426425
if (rc != SQLITE_OK) {
427426
_pysqlite_seterror(self->db, NULL);
@@ -461,7 +460,6 @@ pysqlite_connection_rollback_impl(pysqlite_Connection *self)
461460
/*[clinic end generated code: output=b66fa0d43e7ef305 input=12d4e8d068942830]*/
462461
{
463462
int rc;
464-
const char* tail;
465463
sqlite3_stmt* statement;
466464

467465
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
@@ -472,7 +470,7 @@ pysqlite_connection_rollback_impl(pysqlite_Connection *self)
472470
pysqlite_do_all_statements(self, ACTION_RESET, 1);
473471

474472
Py_BEGIN_ALLOW_THREADS
475-
rc = sqlite3_prepare_v2(self->db, "ROLLBACK", -1, &statement, &tail);
473+
rc = sqlite3_prepare_v2(self->db, "ROLLBACK", -1, &statement, NULL);
476474
Py_END_ALLOW_THREADS
477475
if (rc != SQLITE_OK) {
478476
_pysqlite_seterror(self->db, NULL);

0 commit comments

Comments
 (0)