diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index a41446e..df217c5 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -84,6 +84,7 @@ fastfloat_really_inline uint64_t simd_read8_to_u64(__m128i const &data) { fastfloat_really_inline uint64_t simd_read8_to_u64(char16_t const *chars) { FASTFLOAT_SIMD_DISABLE_WARNINGS + // unaligned SIMD instruction -> all fine. return simd_read8_to_u64( _mm_loadu_si128(reinterpret_cast<__m128i const *>(chars))); FASTFLOAT_SIMD_RESTORE_WARNINGS @@ -172,6 +173,7 @@ simd_parse_if_eight_digits_unrolled(char16_t const *chars, #ifdef FASTFLOAT_SSE2 FASTFLOAT_SIMD_DISABLE_WARNINGS // Load 8 UTF-16 characters (16 bytes) + // unaligned SIMD instruction -> all fine. __m128i const data = _mm_loadu_si128(reinterpret_cast<__m128i const *>(chars)); FASTFLOAT_SIMD_RESTORE_WARNINGS diff --git a/include/fast_float/parse_number.h b/include/fast_float/parse_number.h index 4b86043..1ebdf1e 100644 --- a/include/fast_float/parse_number.h +++ b/include/fast_float/parse_number.h @@ -162,7 +162,7 @@ template <> struct from_chars_caller { // if std::float32_t is defined, and we are in C++23 mode; macro set for // float32; set value to float due to equivalence between float and // float32_t - float val; + float val = 0; auto ret = from_chars_advanced(first, last, val, options); value = val; return ret; @@ -179,7 +179,7 @@ template <> struct from_chars_caller { // if std::float64_t is defined, and we are in C++23 mode; macro set for // float64; set value as double due to equivalence between double and // float64_t - double val; + double val = 0; auto ret = from_chars_advanced(first, last, val, options); value = val; return ret;