Skip to content

Commit 781dc76

Browse files
authored
Fix compiler errors for unused variables (pythonGH-26601)
1 parent d334c73 commit 781dc76

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Modules/_sqlite/connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ connection_close(pysqlite_Connection *self)
276276
{
277277
if (self->db) {
278278
int rc = sqlite3_close_v2(self->db);
279-
assert(rc == SQLITE_OK);
279+
assert(rc == SQLITE_OK), (void)rc;
280280
self->db = NULL;
281281
}
282282
}

Python/compile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7192,6 +7192,7 @@ compute_localsplus_info(struct compiler *c,
71927192
PyObject *names, _PyLocalsPlusKinds kinds)
71937193
{
71947194
int nlocalsplus = (int)PyTuple_GET_SIZE(names);
7195+
(void)nlocalsplus; // Avoid compiler errors for unused variable
71957196

71967197
PyObject *k, *v;
71977198
Py_ssize_t pos = 0;

0 commit comments

Comments
 (0)