From: Fred Drake Date: Fri, 18 Aug 2000 19:53:25 +0000 (+0000) Subject: Remove a couple of warnings turned up by "gcc -Wall". X-Git-Tag: v2.0b1~363 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04e654a63c012cc321572e6dabbe70550c4f319f;p=thirdparty%2FPython%2Fcpython.git Remove a couple of warnings turned up by "gcc -Wall". --- diff --git a/Python/ceval.c b/Python/ceval.c index af28cdca874c..92fa887af41c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2856,8 +2856,9 @@ find_from_args(PyFrameObject *f, int nexti) if (!name) Py_DECREF(list); else { - if (PyList_Append(list, name) < 0) + if (PyList_Append(list, name) < 0) { Py_DECREF(list); + } Py_DECREF(name); } } else { diff --git a/Python/exceptions.c b/Python/exceptions.c index b441f5178423..6d6291ce3225 100644 --- a/Python/exceptions.c +++ b/Python/exceptions.c @@ -793,7 +793,7 @@ SyntaxError__str__(PyObject *self, PyObject *args) buffer = PyMem_Malloc(bufsize); if (buffer != NULL) { if (have_filename && have_lineno) - sprintf(buffer, "%s (%s, line %d)", + sprintf(buffer, "%s (%s, line %ld)", PyString_AS_STRING(str), my_basename(PyString_AS_STRING(filename)), PyInt_AsLong(lineno)); @@ -802,7 +802,7 @@ SyntaxError__str__(PyObject *self, PyObject *args) PyString_AS_STRING(str), my_basename(PyString_AS_STRING(filename))); else if (have_lineno) - sprintf(buffer, "%s (line %d)", + sprintf(buffer, "%s (line %ld)", PyString_AS_STRING(str), PyInt_AsLong(lineno));