Fix Windows MSVC compilation and cppcheck warnings, code struct triggers padding warnings
This commit is contained in:
Vendored
+9
@@ -31,6 +31,11 @@
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4820) // padding warnings
|
||||
#endif
|
||||
|
||||
struct hardfork_t
|
||||
{
|
||||
uint8_t version;
|
||||
@@ -40,6 +45,10 @@ struct hardfork_t
|
||||
hardfork_t(uint8_t version, uint64_t height, uint8_t threshold, time_t time): version(version), height(height), threshold(threshold), time(time) {}
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
extern const hardfork_t mainnet_hard_forks[];
|
||||
extern const uint64_t mainnet_hard_fork_version_1_till;
|
||||
extern const size_t num_mainnet_hard_forks;
|
||||
|
||||
Reference in New Issue
Block a user