Fix Windows MSVC compilation and cppcheck warnings, code struct triggers padding warnings

This commit is contained in:
Matt Hess
2025-12-19 20:57:48 +00:00
parent d509947157
commit 04d5d3634b
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -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;