Commit df8b7404 authored by Guido van Rossum's avatar Guido van Rossum

Implement straightforward suggestions from gcc warnings (remove unused

variable, add extra braces).
parent b149393f
......@@ -70,8 +70,6 @@ frozenset_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *
set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyObject *iterable = NULL;
return make_new_set(type, NULL);
}
......@@ -781,11 +779,12 @@ If the element is not a member, raise a KeyError.");
static PyObject *
set_discard(PySetObject *so, PyObject *item)
{
if (PyDict_DelItem(so->data, item) == -1)
if (PyDict_DelItem(so->data, item) == -1) {
if (PyErr_ExceptionMatches(PyExc_KeyError))
PyErr_Clear();
else
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
......
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