]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix compiler errors for unused variables (GH-26601)
authorPablo Galindo <Pablogsal@gmail.com>
Tue, 8 Jun 2021 12:16:24 +0000 (13:16 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Jun 2021 12:16:24 +0000 (13:16 +0100)
Modules/_sqlite/connection.c
Python/compile.c

index 4ec74dd26fab64bbf53f4863ad49c7ecbcf4fbcf..9199c347caab0dfda822d50de5e8a255dba058c4 100644 (file)
@@ -276,7 +276,7 @@ connection_close(pysqlite_Connection *self)
 {
     if (self->db) {
         int rc = sqlite3_close_v2(self->db);
-        assert(rc == SQLITE_OK);
+        assert(rc == SQLITE_OK), (void)rc;
         self->db = NULL;
     }
 }
index 056dacf9b6c5d3541caeec6de6f535e80061e064..c97938adaafcf4ed699854ba5f0b1c30c701dc0c 100644 (file)
@@ -7192,6 +7192,7 @@ compute_localsplus_info(struct compiler *c,
                         PyObject *names, _PyLocalsPlusKinds kinds)
 {
     int nlocalsplus = (int)PyTuple_GET_SIZE(names);
+    (void)nlocalsplus; // Avoid compiler errors for unused variable
 
     PyObject *k, *v;
     Py_ssize_t pos = 0;