1
0
Fork 0
forked from lthn/blockchain

fixed warnings on linux

This commit is contained in:
cryptozoidberg 2022-10-11 13:44:59 +02:00
parent 4fa2afa87e
commit f1a7c25fa3
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
3 changed files with 7 additions and 1 deletions

View file

@ -79,6 +79,8 @@ namespace net_utils
m_started(time(NULL))
{}
connection_context_base(const connection_context_base& a) = default;
connection_context_base& operator=(const connection_context_base& a)
{
set_details(a.m_connection_id, a.m_remote_ip, a.m_remote_port, a.m_is_income);

View file

@ -844,8 +844,11 @@ namespace crypto
// zeroes all elements
void zero()
{
PUSH_GCC_WARNINGS()
DISABLE_GCC_AND_CLANG_WARNING(class-memaccess)
size_t size_bytes = sizeof(scalar_t) * size();
memset(data(), 0, size_bytes);
POP_GCC_WARNINGS()
}
// invert all elements in-place efficiently: 4*N muptiplications + 1 inversion

View file

@ -193,7 +193,7 @@ namespace currency
}
//---------------------------------------------------------------
inline
const bool get_key_image_from_txin_v(const txin_v& in_v, crypto::key_image& result) noexcept
bool get_key_image_from_txin_v(const txin_v& in_v, crypto::key_image& result) noexcept
{
try
{
@ -218,6 +218,7 @@ namespace currency
catch(...)
{
// should never go here, just precaution
return false;
}
return false;