mirror of https://github.com/python/cpython.git
Make new gcc -Wall happy
This commit is contained in:
parent
bb3649e2ba
commit
1109fbca76
|
@ -190,10 +190,12 @@ file_dealloc(f)
|
||||||
(*f->f_close)(f->f_fp);
|
(*f->f_close)(f->f_fp);
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
}
|
}
|
||||||
if (f->f_name != NULL)
|
if (f->f_name != NULL) {
|
||||||
Py_DECREF(f->f_name);
|
Py_DECREF(f->f_name);
|
||||||
if (f->f_mode != NULL)
|
}
|
||||||
|
if (f->f_mode != NULL) {
|
||||||
Py_DECREF(f->f_mode);
|
Py_DECREF(f->f_mode);
|
||||||
|
}
|
||||||
free((char *)f);
|
free((char *)f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -771,8 +773,9 @@ file_readlines(f, args)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
cleanup:
|
cleanup:
|
||||||
if (big_buffer)
|
if (big_buffer) {
|
||||||
Py_DECREF(big_buffer);
|
Py_DECREF(big_buffer);
|
||||||
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,8 +110,9 @@ PyFunction_SetDefaults(op, defaults)
|
||||||
}
|
}
|
||||||
if (defaults == Py_None)
|
if (defaults == Py_None)
|
||||||
defaults = NULL;
|
defaults = NULL;
|
||||||
else if (PyTuple_Check(defaults))
|
else if (PyTuple_Check(defaults)) {
|
||||||
Py_XINCREF(defaults);
|
Py_XINCREF(defaults);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
PyErr_SetString(PyExc_SystemError, "non-tuple default args");
|
PyErr_SetString(PyExc_SystemError, "non-tuple default args");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -497,7 +497,7 @@ PyLong_FromString(str, pend, base)
|
||||||
static PyLongObject *x_divrem
|
static PyLongObject *x_divrem
|
||||||
Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject **));
|
Py_PROTO((PyLongObject *, PyLongObject *, PyLongObject **));
|
||||||
static PyObject *long_pos Py_PROTO((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 **));
|
PyLongObject **, PyLongObject **));
|
||||||
|
|
||||||
/* Long division with remainder, top-level routine */
|
/* Long division with remainder, top-level routine */
|
||||||
|
|
|
@ -1016,14 +1016,16 @@ PyString_Format(format, args)
|
||||||
"not all arguments converted");
|
"not all arguments converted");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (args_owned)
|
if (args_owned) {
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
|
}
|
||||||
_PyString_Resize(&result, reslen - rescnt);
|
_PyString_Resize(&result, reslen - rescnt);
|
||||||
return result;
|
return result;
|
||||||
error:
|
error:
|
||||||
Py_DECREF(result);
|
Py_DECREF(result);
|
||||||
if (args_owned)
|
if (args_owned) {
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue