Skip to content

Commit 5376689

Browse files
authored
Merge pull request #967 from mborland/warnings
Fix -Wmaybe-uninitialized in bessel jy series
2 parents a619c3c + 1f94d98 commit 5376689

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/boost/math/special_functions/detail/bessel_jy_derivatives_series.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ inline T bessel_y_derivative_small_z_series(T v, T x, const Policy& pol)
194194
}
195195
else
196196
{
197-
int sgn;
197+
int sgn {};
198198
prefix = boost::math::lgamma(-v, &sgn, pol) + (v - 1) * log(x / 2) - constants::ln_two<T>();
199199
prefix = exp(prefix) * sgn / boost::math::constants::pi<T>();
200200
}

include/boost/math/special_functions/detail/bessel_jy_series.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ inline T bessel_y_small_z_series(T v, T x, T* pscale, const Policy& pol)
193193
}
194194
else
195195
{
196-
int sgn;
196+
int sgn {};
197197
prefix = boost::math::lgamma(-v, &sgn, pol) + p;
198198
prefix = exp(prefix) * sgn / constants::pi<T>();
199199
}

0 commit comments

Comments
 (0)