Commit 03d8b426 authored by Lisandro Dalcin's avatar Lisandro Dalcin Committed by GitHub

Merge pull request #1952 from cython/dalcinl/mark-unused-vars

Mark unused vars with `(void)x;` [should silence Coverity Scan]
parents 33074672 63c7adae
......@@ -6836,7 +6836,8 @@ class TryExceptStatNode(StatNode):
else:
# try block cannot raise exceptions, but we had to allocate the temps above,
# so just keep the C compiler from complaining about them being unused
save_exc.putln("if (%s); else {/*mark used*/}" % '||'.join(exc_save_vars))
mark_vars_used = ["(void)%s;" % var for var in exc_save_vars]
save_exc.putln("%s /* mark used */" % ' '.join(mark_vars_used))
def restore_saved_exception():
pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment