]> granicus.if.org Git - python/commitdiff
Make new gcc -Wall happy
authorGuido van Rossum <guido@python.org>
Fri, 10 Apr 1998 22:16:39 +0000 (22:16 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 10 Apr 1998 22:16:39 +0000 (22:16 +0000)
Objects/fileobject.c
Objects/funcobject.c
Objects/longobject.c
Objects/stringobject.c

index 51752abc1312d1fc9f331d17b8d79dce505febaa..49517c5c264d399916faac7c48814484378cf5ec 100644 (file)
@@ -190,10 +190,12 @@ file_dealloc(f)
                (*f->f_close)(f->f_fp);
                Py_END_ALLOW_THREADS
        }
-       if (f->f_name != NULL)
+       if (f->f_name != NULL) {
                Py_DECREF(f->f_name);
-       if (f->f_mode != NULL)
+       }
+       if (f->f_mode != NULL) {
                Py_DECREF(f->f_mode);
+       }
        free((char *)f);
 }
 
@@ -771,8 +773,9 @@ file_readlines(f, args)
                        goto error;
        }
   cleanup:
-       if (big_buffer)
+       if (big_buffer) {
                Py_DECREF(big_buffer);
+       }
        return list;
 }
 
index be67259ce9884600f0b7ad0c2995b10b6725f6fd..d62dd08c190b14d1cbff2f79fc28277883c989e2 100644 (file)
@@ -110,8 +110,9 @@ PyFunction_SetDefaults(op, defaults)
        }
        if (defaults == Py_None)
                defaults = NULL;
-       else if (PyTuple_Check(defaults))
+       else if (PyTuple_Check(defaults)) {
                Py_XINCREF(defaults);
+       }
        else {
                PyErr_SetString(PyExc_SystemError, "non-tuple default args");
                return -1;
index d95e86cf796c51311c8cc0efbf663ba7ec91cc32..becf1bc46548fa603152c52eacd55960d548b999 100644 (file)
@@ -497,7 +497,7 @@ PyLong_FromString(str, pend, base)
 static PyLongObject *x_divrem
        Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject **));
 static PyObject *long_pos Py_PROTO((PyLongObject *));
-static long_divrem Py_PROTO((PyLongObject *, PyLongObject *,
+static int long_divrem Py_PROTO((PyLongObject *, PyLongObject *,
        PyLongObject **, PyLongObject **));
 
 /* Long division with remainder, top-level routine */
index 5928128ce147fc3f122694e688a20cf4d3ee12b9..5e6a5a5938d70b8881b7a7a3a8f4ad2160844f95 100644 (file)
@@ -1016,14 +1016,16 @@ PyString_Format(format, args)
                                "not all arguments converted");
                goto error;
        }
-       if (args_owned)
+       if (args_owned) {
                Py_DECREF(args);
+       }
        _PyString_Resize(&result, reslen - rescnt);
        return result;
  error:
        Py_DECREF(result);
-       if (args_owned)
+       if (args_owned) {
                Py_DECREF(args);
+       }
        return NULL;
 }