]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove a couple of warnings turned up by "gcc -Wall".
authorFred Drake <fdrake@acm.org>
Fri, 18 Aug 2000 19:53:25 +0000 (19:53 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 18 Aug 2000 19:53:25 +0000 (19:53 +0000)
Python/ceval.c
Python/exceptions.c

index af28cdca874c853b8103fb3bebecb6c7ec987ae3..92fa887af41cf1b91f4c9e38a71eb0dcb38cf33b 100644 (file)
@@ -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 {
index b441f5178423fb0a70839e0df8c6d73108368515..6d6291ce32252e325c2ca0d54c68a42711df560e 100644 (file)
@@ -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));