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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user