From fd4406dca6750f2a3612ae5df81f5a424200df7e Mon Sep 17 00:00:00 2001 From: ckormanyos Date: Sun, 7 Jul 2024 11:03:48 +0200 Subject: [PATCH] Handle wanrings/errors from LLVM embedded --- math/wide_decimal/decwide_t_detail.h | 8 ++++---- math/wide_decimal/decwide_t_detail_fft.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/math/wide_decimal/decwide_t_detail.h b/math/wide_decimal/decwide_t_detail.h index baf6b91b..a15d2f13 100644 --- a/math/wide_decimal/decwide_t_detail.h +++ b/math/wide_decimal/decwide_t_detail.h @@ -92,14 +92,14 @@ class native_float_parts final { public: + // Emphasize: This template class can be used with native + // floating-point types like float, double and long double. + native_float_parts() = delete; ~native_float_parts() noexcept = default; // LCOV_EXCL_LINE private: - // Emphasize: This template class can be used with native - // floating-point types like float, double and long double. - template(un / static_cast(UINT8_C(10U))); + un = static_cast(un / static_cast(UINT8_C(10))); p10 = static_cast(p10 * static_cast(UINT8_C(10))); diff --git a/math/wide_decimal/decwide_t_detail_fft.h b/math/wide_decimal/decwide_t_detail_fft.h index a3477962..bd427caa 100644 --- a/math/wide_decimal/decwide_t_detail_fft.h +++ b/math/wide_decimal/decwide_t_detail_fft.h @@ -40,7 +40,7 @@ constexpr auto template_one() -> double { return static_cast(1.0F); } // NOLINT(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers) template<> - constexpr auto template_one() -> long double { return 1.0F; } // NOLINT(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers) + constexpr auto template_one() -> long double { return static_cast(1.0F); } // NOLINT(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers) template<> constexpr auto template_half() -> float { return static_cast(0.5L); } // NOLINT(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)