Skip to content

Commit e5dd84e

Browse files
committed
Fix compiler warnings (uninitialized variables), false alarms in fact
1 parent 4bd4e14 commit e5dd84e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Objects/longobject.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ long_to_decimal_string_internal(PyObject *aa,
15871587
char **bytes_str)
15881588
{
15891589
PyLongObject *scratch, *a;
1590-
PyObject *str;
1590+
PyObject *str = NULL;
15911591
Py_ssize_t size, strlen, size_a, i, j;
15921592
digit *pout, *pin, rem, tenpow;
15931593
int negative;
@@ -1664,7 +1664,6 @@ long_to_decimal_string_internal(PyObject *aa,
16641664
return -1;
16651665
}
16661666
kind = writer->kind;
1667-
str = NULL;
16681667
}
16691668
else if (bytes_writer) {
16701669
*bytes_str = _PyBytesWriter_Prepare(bytes_writer, *bytes_str, strlen);
@@ -1777,7 +1776,7 @@ long_format_binary(PyObject *aa, int base, int alternate,
17771776
_PyBytesWriter *bytes_writer, char **bytes_str)
17781777
{
17791778
PyLongObject *a = (PyLongObject *)aa;
1780-
PyObject *v;
1779+
PyObject *v = NULL;
17811780
Py_ssize_t sz;
17821781
Py_ssize_t size_a;
17831782
enum PyUnicode_Kind kind;
@@ -1834,7 +1833,6 @@ long_format_binary(PyObject *aa, int base, int alternate,
18341833
if (_PyUnicodeWriter_Prepare(writer, sz, 'x') == -1)
18351834
return -1;
18361835
kind = writer->kind;
1837-
v = NULL;
18381836
}
18391837
else if (bytes_writer) {
18401838
*bytes_str = _PyBytesWriter_Prepare(bytes_writer, *bytes_str, sz);

0 commit comments

Comments
 (0)