Remove useless variable initialization

Don't initialize variables which are not used before they are assigned.
This commit is contained in:
Victor Stinner 2016-12-09 17:08:59 +01:00
parent b110dad9ab
commit 14e6d09547
1 changed files with 6 additions and 9 deletions

View File

@ -2614,8 +2614,7 @@ PyObject *
PyObject_CallMethod(PyObject *obj, const char *name, const char *format, ...) PyObject_CallMethod(PyObject *obj, const char *name, const char *format, ...)
{ {
va_list va; va_list va;
PyObject *callable = NULL; PyObject *callable, *retval;
PyObject *retval = NULL;
if (obj == NULL || name == NULL) { if (obj == NULL || name == NULL) {
return null_error(); return null_error();
@ -2638,8 +2637,7 @@ _PyObject_CallMethodId(PyObject *obj, _Py_Identifier *name,
const char *format, ...) const char *format, ...)
{ {
va_list va; va_list va;
PyObject *callable = NULL; PyObject *callable, *retval;
PyObject *retval = NULL;
if (obj == NULL || name == NULL) { if (obj == NULL || name == NULL) {
return null_error(); return null_error();
@ -2662,8 +2660,7 @@ _PyObject_CallMethod_SizeT(PyObject *obj, const char *name,
const char *format, ...) const char *format, ...)
{ {
va_list va; va_list va;
PyObject *callable = NULL; PyObject *callable, *retval;
PyObject *retval;
if (obj == NULL || name == NULL) { if (obj == NULL || name == NULL) {
return null_error(); return null_error();
@ -2686,8 +2683,7 @@ _PyObject_CallMethodId_SizeT(PyObject *obj, _Py_Identifier *name,
const char *format, ...) const char *format, ...)
{ {
va_list va; va_list va;
PyObject *callable = NULL; PyObject *callable, *retval;
PyObject *retval;
if (obj == NULL || name == NULL) { if (obj == NULL || name == NULL) {
return null_error(); return null_error();
@ -3112,7 +3108,8 @@ PyObject *
PyObject_GetIter(PyObject *o) PyObject_GetIter(PyObject *o)
{ {
PyTypeObject *t = o->ob_type; PyTypeObject *t = o->ob_type;
getiterfunc f = NULL; getiterfunc f;
f = t->tp_iter; f = t->tp_iter;
if (f == NULL) { if (f == NULL) {
if (PySequence_Check(o)) if (PySequence_Check(o))