summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-11-18 19:27:19 (GMT)
committerGuido van Rossum <guido@python.org>2003-11-18 19:27:19 (GMT)
commitb61982bacbe0ebbeeb7a47018328979302d6221a (patch)
tree0d750b431174ebd6052e3adcdc3b2c8fdae59bd5
parent65674b80fc70b222a5a4bfc63b02691fba5aec9e (diff)
downloadcpython-b61982bacbe0ebbeeb7a47018328979302d6221a.zip
cpython-b61982bacbe0ebbeeb7a47018328979302d6221a.tar.gz
cpython-b61982bacbe0ebbeeb7a47018328979302d6221a.tar.bz2
Implement straightforward suggestions from gcc warnings (remove unused
variable, add extra braces).
-rw-r--r--Objects/setobject.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index d817727..2a53cba 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -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;
}