mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
Implement straightforward suggestions from gcc warnings (remove unused
variable, add extra braces).
This commit is contained in:
parent
65674b80fc
commit
b61982bacb
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue