From: Benjamin Peterson Date: Tue, 6 Sep 2016 17:01:16 +0000 (-0700) Subject: fix unused variable warnings in pysqlite (closes #27967) X-Git-Tag: v2.7.13rc1~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0039d1f8dea8c19a3718fa9ae7840e2290d91f6;p=python fix unused variable warnings in pysqlite (closes #27967) --- diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index f2b48ffa3a..db360040e4 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -118,11 +118,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); } diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c index edcebddf9a..04fcc5b41f 100644 --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -411,11 +411,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 }