]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-100873: Fix "‘lo’ may be used uninitialized in this function" warning in `mathmodu...
authorNikita Sobolev <mail@sobolevn.me>
Mon, 9 Jan 2023 15:51:24 +0000 (18:51 +0300)
committerGitHub <noreply@github.com>
Mon, 9 Jan 2023 15:51:24 +0000 (21:21 +0530)
Modules/mathmodule.c

index 9e4c6fded93353400db9f2f09b9a02e77faad59b..1342162fa74be70f6f9fa354bc31107632dc07fd 100644 (file)
@@ -1467,7 +1467,7 @@ math_fsum(PyObject *module, PyObject *seq)
     Py_ssize_t i, j, n = 0, m = NUM_PARTIALS;
     double x, y, t, ps[NUM_PARTIALS], *p = ps;
     double xsave, special_sum = 0.0, inf_sum = 0.0;
-    double hi, yr, lo;
+    double hi, yr, lo = 0.0;
 
     iter = PyObject_GetIter(seq);
     if (iter == NULL)