Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unused abterm1 compile warnings #1014

Merged
merged 1 commit into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions include/boost/math/quadrature/detail/exp_sinh_detail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ auto exp_sinh_detail<Real, Policy>::integrate(const F& f, Real* error, Real* L1,
auto weight_row = get_weight_row(i);

first_j = first_j == 0 ? 0 : 2 * first_j - 1; // appoximate location to start looking for lowest meaningful abscissa value
BOOST_MATH_MAYBE_UNUSED Real abterm1 = 1;
std::size_t j = first_j;
while (abscissas_row[j] < min_abscissa)
++j;
Expand All @@ -237,7 +236,6 @@ auto exp_sinh_detail<Real, Policy>::integrate(const F& f, Real* error, Real* L1,
sum += y*weight_row[j];
Real abterm0 = abs(y)*weight_row[j];
absum += abterm0;
abterm1 = abterm0;
}

I1 += sum*h;
Expand Down
17 changes: 0 additions & 17 deletions include/boost/math/tools/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,23 +146,6 @@
# define BOOST_MATH_EXEC_COMPATIBLE
#endif

// Attributes from C++14 and newer
#ifdef __has_cpp_attribute

// C++17
#if (__cplusplus >= 201703L || _MSVC_LANG >= 201703L)
# if __has_cpp_attribute(maybe_unused)
# define BOOST_MATH_MAYBE_UNUSED [[maybe_unused]]
# endif
#endif

#endif // Standalone config

// If attributes are not defined make sure we don't have compiler errors
#ifndef BOOST_MATH_MAYBE_UNUSED
# define BOOST_MATH_MAYBE_UNUSED
#endif

// C++23
#if __cplusplus > 202002L || _MSVC_LANG > 202002L
# if __GNUC__ >= 13
Expand Down