[Python-checkins] cpython (2.7): fix unused variable warnings in pysqlite (closes #27967)

benjamin.peterson python-checkins at python.org
Tue Sep 6 13:02:06 EDT 2016


https://hg.python.org/cpython/rev/ecaa1af8fe04
changeset:   103117:ecaa1af8fe04
branch:      2.7
parent:      103101:65102408021e
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Sep 06 10:01:16 2016 -0700
summary:
  fix unused variable warnings in pysqlite (closes #27967)

files:
  Modules/_sqlite/cursor.c    |  4 +---
  Modules/_sqlite/statement.c |  4 +---
  2 files changed, 2 insertions(+), 6 deletions(-)


diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -118,11 +118,9 @@
 
 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);
     }
 
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -411,11 +411,9 @@
 
 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
     }
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list