1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 08:23:34 -05:00

Fixed GCC warnings

This commit is contained in:
SChernykh
2021-06-19 14:54:03 +02:00
parent e3fc78a66c
commit 3f3f9b0661
3 changed files with 11 additions and 9 deletions

View File

@@ -46,14 +46,16 @@ struct RawSMBIOSData {
bool xmrig::DmiReader::read()
{
const uint32_t size = GetSystemFirmwareTable('RSMB', 0, nullptr, 0);
constexpr uint32_t RSMB = 0x52534D42;
const uint32_t size = GetSystemFirmwareTable(RSMB, 0, nullptr, 0);
auto smb = reinterpret_cast<RawSMBIOSData *>(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size));
if (!smb) {
return false;
}
if (GetSystemFirmwareTable('RSMB', 0, smb, size) != size) {
if (GetSystemFirmwareTable(RSMB, 0, smb, size) != size) {
HeapFree(GetProcessHeap(), 0, smb);
return false;