Skip to content

Commit b110dad

Browse files
committed
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.
1 parent 5abaa2b commit b110dad

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Modules/_cursesmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y,
594594
int attr_group = group_right_1;
595595
int rtn;
596596
int type;
597-
chtype cch;
597+
chtype cch = 0;
598598
#ifdef HAVE_NCURSESW
599599
wchar_t wstr[2];
600600
cchar_t wcval;

Modules/_pickle.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4762,7 +4762,7 @@ static int
47624762
load_long(UnpicklerObject *self)
47634763
{
47644764
PyObject *value;
4765-
char *s;
4765+
char *s = NULL;
47664766
Py_ssize_t len;
47674767

47684768
if ((len = _Unpickler_Readline(self, &s)) < 0)
@@ -4993,7 +4993,7 @@ load_unicode(UnpicklerObject *self)
49934993
{
49944994
PyObject *str;
49954995
Py_ssize_t len;
4996-
char *s;
4996+
char *s = NULL;
49974997

49984998
if ((len = _Unpickler_Readline(self, &s)) < 0)
49994999
return -1;
@@ -5732,7 +5732,7 @@ load_put(UnpicklerObject *self)
57325732
PyObject *key, *value;
57335733
Py_ssize_t idx;
57345734
Py_ssize_t len;
5735-
char *s;
5735+
char *s = NULL;
57365736

57375737
if ((len = _Unpickler_Readline(self, &s)) < 0)
57385738
return -1;

0 commit comments

Comments
 (0)