Commit 63c7adae authored by Lisandro Dalcin's avatar Lisandro Dalcin

Mark unused vars with `(void)x;` [should silence Coverity Scan]

parent 0992c63e
......@@ -6819,7 +6819,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