mirror of
https://github.com/python/cpython.git
synced 2025-12-11 03:20:01 +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 *
|
static PyObject *
|
||||||
set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
{
|
{
|
||||||
PyObject *iterable = NULL;
|
|
||||||
|
|
||||||
return make_new_set(type, NULL);
|
return make_new_set(type, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -781,11 +779,12 @@ If the element is not a member, raise a KeyError.");
|
||||||
static PyObject *
|
static PyObject *
|
||||||
set_discard(PySetObject *so, PyObject *item)
|
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))
|
if (PyErr_ExceptionMatches(PyExc_KeyError))
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue