Commit 04e654a6 authored by Fred Drake's avatar Fred Drake

Remove a couple of warnings turned up by "gcc -Wall".

parent ce4dc41b
...@@ -2856,8 +2856,9 @@ find_from_args(PyFrameObject *f, int nexti) ...@@ -2856,8 +2856,9 @@ find_from_args(PyFrameObject *f, int nexti)
if (!name) if (!name)
Py_DECREF(list); Py_DECREF(list);
else { else {
if (PyList_Append(list, name) < 0) if (PyList_Append(list, name) < 0) {
Py_DECREF(list); Py_DECREF(list);
}
Py_DECREF(name); Py_DECREF(name);
} }
} else { } else {
......
...@@ -793,7 +793,7 @@ SyntaxError__str__(PyObject *self, PyObject *args) ...@@ -793,7 +793,7 @@ SyntaxError__str__(PyObject *self, PyObject *args)
buffer = PyMem_Malloc(bufsize); buffer = PyMem_Malloc(bufsize);
if (buffer != NULL) { if (buffer != NULL) {
if (have_filename && have_lineno) if (have_filename && have_lineno)
sprintf(buffer, "%s (%s, line %d)", sprintf(buffer, "%s (%s, line %ld)",
PyString_AS_STRING(str), PyString_AS_STRING(str),
my_basename(PyString_AS_STRING(filename)), my_basename(PyString_AS_STRING(filename)),
PyInt_AsLong(lineno)); PyInt_AsLong(lineno));
...@@ -802,7 +802,7 @@ SyntaxError__str__(PyObject *self, PyObject *args) ...@@ -802,7 +802,7 @@ SyntaxError__str__(PyObject *self, PyObject *args)
PyString_AS_STRING(str), PyString_AS_STRING(str),
my_basename(PyString_AS_STRING(filename))); my_basename(PyString_AS_STRING(filename)));
else if (have_lineno) else if (have_lineno)
sprintf(buffer, "%s (line %d)", sprintf(buffer, "%s (line %ld)",
PyString_AS_STRING(str), PyString_AS_STRING(str),
PyInt_AsLong(lineno)); PyInt_AsLong(lineno));
......
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