Commit b656020f authored by Stefan Behnel's avatar Stefan Behnel

Suppress C compiler warning about an unused variable.

parent 34ab4c7d
...@@ -3516,10 +3516,10 @@ class DefNodeWrapper(FuncDefNode): ...@@ -3516,10 +3516,10 @@ class DefNodeWrapper(FuncDefNode):
if entry.is_arg: if entry.is_arg:
code.put_var_declaration(entry) code.put_var_declaration(entry)
# Assign nargs variable as len(args) # Assign nargs variable as len(args), but avoid an "unused" warning in the few cases where we don't need it.
if self.signature_has_generic_args(): if self.signature_has_generic_args():
code.putln("const Py_ssize_t %s = PyTuple_GET_SIZE(%s);" % code.putln("const Py_ssize_t %s = PyTuple_GET_SIZE(%s); (void)%s;" % (
(Naming.nargs_cname, Naming.args_cname)) Naming.nargs_cname, Naming.args_cname, Naming.nargs_cname))
def generate_argument_parsing_code(self, env, code): def generate_argument_parsing_code(self, env, code):
# Generate fast equivalent of PyArg_ParseTuple call for # Generate fast equivalent of PyArg_ParseTuple call for
......
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