Initialize variables to fix compiler warnings

Warnings seen on the "AMD64 Debian PGO 3.x" buildbot. Warnings are false
positive, but variable initialization should not harm performances.
This commit is contained in:
Victor Stinner 2016-12-09 17:06:43 +01:00
parent 5abaa2b139
commit b110dad9ab
2 changed files with 4 additions and 4 deletions

View File

@ -594,7 +594,7 @@ curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y,
int attr_group = group_right_1; int attr_group = group_right_1;
int rtn; int rtn;
int type; int type;
chtype cch; chtype cch = 0;
#ifdef HAVE_NCURSESW #ifdef HAVE_NCURSESW
wchar_t wstr[2]; wchar_t wstr[2];
cchar_t wcval; cchar_t wcval;

View File

@ -4762,7 +4762,7 @@ static int
load_long(UnpicklerObject *self) load_long(UnpicklerObject *self)
{ {
PyObject *value; PyObject *value;
char *s; char *s = NULL;
Py_ssize_t len; Py_ssize_t len;
if ((len = _Unpickler_Readline(self, &s)) < 0) if ((len = _Unpickler_Readline(self, &s)) < 0)
@ -4993,7 +4993,7 @@ load_unicode(UnpicklerObject *self)
{ {
PyObject *str; PyObject *str;
Py_ssize_t len; Py_ssize_t len;
char *s; char *s = NULL;
if ((len = _Unpickler_Readline(self, &s)) < 0) if ((len = _Unpickler_Readline(self, &s)) < 0)
return -1; return -1;
@ -5732,7 +5732,7 @@ load_put(UnpicklerObject *self)
PyObject *key, *value; PyObject *key, *value;
Py_ssize_t idx; Py_ssize_t idx;
Py_ssize_t len; Py_ssize_t len;
char *s; char *s = NULL;
if ((len = _Unpickler_Readline(self, &s)) < 0) if ((len = _Unpickler_Readline(self, &s)) < 0)
return -1; return -1;