skalenetwork / skaled

Running more than 20 production blockchains, SKALED is Ethereum-compatible, high performance C++ Proof-of-Stake client, tools and libraries. Uses SKALE consensus as a blockchain consensus core. Includes dynamic Oracle. Implements file storage and retrieval as an EVM extension.
https://skale.network
GNU General Public License v3.0
84 stars 39 forks source link

microprofile build doesn't work #1689

Closed olehnikolaiev closed 6 days ago

olehnikolaiev commented 12 months ago

compiler returns an error when trying to build skaled with -DMICROPROFILE=ON

/home/oleh/work/skaled/libdevcore/microprofile.cpp:986:36: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct MicroProfile’ with no trivial copy-assignment; use value-initialization instead [-Werror=class-memaccess]
  986 |         memset( &S, 0, sizeof( S ) );
      |                                    ^
/home/oleh/work/skaled/libdevcore/microprofile.cpp:496:8: note: ‘struct MicroProfile’ declared here
  496 | struct MicroProfile {
      |        ^~~~~~~~~~~~
/home/oleh/work/skaled/libdevcore/microprofile.cpp: In function ‘MicroProfileThreadLog* MicroProfileCreateThreadLog(const char*)’:
/home/oleh/work/skaled/libdevcore/microprofile.cpp:1136:42: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct MicroProfileThreadLog’ with no trivial copy-assignment; use value-initialization instead [-Werror=class-memaccess]
 1136 |         memset( pLog, 0, sizeof( *pLog ) );
PolinaKiporenko commented 12 months ago

Added in 2.3 release due to it small fix and was found during work on https://github.com/skalenetwork/skaled/issues/1640