diff --git a/sprout/bitset/bitset.hpp b/sprout/bitset/bitset.hpp index 87959923..d66213dd 100644 --- a/sprout/bitset/bitset.hpp +++ b/sprout/bitset/bitset.hpp @@ -699,7 +699,8 @@ namespace sprout { SPROUT_CXX14_CONSTEXPR word_type& getword(std::size_t) SPROUT_NOEXCEPT { - return throw std::out_of_range("base_bitset::getword"), *new word_type(); + typedef word_type* type; + return throw std::out_of_range("base_bitset::getword"), *type(); } SPROUT_CONSTEXPR word_type getword(std::size_t) const SPROUT_NOEXCEPT { diff --git a/sprout/checksum/sha1.hpp b/sprout/checksum/sha1.hpp index 594c8807..5b7250af 100644 --- a/sprout/checksum/sha1.hpp +++ b/sprout/checksum/sha1.hpp @@ -380,7 +380,7 @@ namespace sprout { }}; } SPROUT_CXX14_CONSTEXPR void process_block() { - std::uint32_t w[80]; + std::uint32_t w[80] = {}; for (std::size_t i = 0; i < 16; ++i) { w[i] = (block_[i * 4 + 0] << 24); w[i] |= (block_[i * 4 + 1] << 16); diff --git a/sprout/uuid/uuid.hpp b/sprout/uuid/uuid.hpp index 0e065d04..1d4db7dc 100644 --- a/sprout/uuid/uuid.hpp +++ b/sprout/uuid/uuid.hpp @@ -202,7 +202,7 @@ namespace sprout { SPROUT_CXX14_CONSTEXPR pointer c_array() SPROUT_NOEXCEPT { return &elems[0]; } - SPROUT_CONSTEXPR const_pointer c_array() SPROUT_NOEXCEPT { + SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT { return &elems[0]; } SPROUT_CXX14_CONSTEXPR void assign(const_reference value) {