Fixed cppcheck errors

This commit is contained in:
SChernykh
2025-10-19 16:14:43 +02:00
parent d8e4a00a32
commit d88790237d
3 changed files with 23 additions and 3 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ static FORCEINLINE constexpr uint64_t rotl64(uint64_t x) { return (x << y) | (x
template<int ROUNDS>
static FORCEINLINE constexpr void keccakf(std::array<uint64_t, 25>& st)
{
constexpr uint64_t keccakf_rndc[24] =
constexpr uint64_t round_constants[24] =
{
0x0000000000000001, 0x0000000000008082, 0x800000000000808a,
0x8000000080008000, 0x000000000000808b, 0x0000000080000001,
@@ -85,7 +85,7 @@ static FORCEINLINE constexpr void keccakf(std::array<uint64_t, 25>& st)
}
// Iota
st[0] ^= keccakf_rndc[round];
st[0] ^= round_constants[round];
}
}
@@ -139,6 +139,6 @@ constexpr hash keccak_0x00 = keccak("\0");
constexpr hash keccak_subaddress_viewpub = keccak("subaddress_viewpub");
constexpr hash keccak_onion_address_v3 = keccak("onion_address_v3");
static_assert((keccak_0x00.h[0] == 0xBC) && (keccak_0x00.h[1] == 0x36) && (keccak_0x00.h[2] == 0x78) && (keccak_0x00.h[3] == 0x9E), "constexpr keccak code check failed");
static_assert(keccak_0x00.u64<0>() == 0x14281E7A9E7836BCULL, "constexpr keccak code check failed");
} // namespace p2pool