Fix for gcc 10 type conversion
Converted to byte first to remove error:
error: conversion from 'int' to non-scalar type
'std::variant<unsigned char>' requested | 299 |
std::variant<uint8_t> value = 0;
Tested: built with dunfell
Change-Id: Idfbf459bbf32dfb62857a84fd7ed0a21918b2d1c
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/smbiosmdrv2handler.cpp b/src/smbiosmdrv2handler.cpp
index 425a890..a33d0b2 100644
--- a/src/smbiosmdrv2handler.cpp
+++ b/src/smbiosmdrv2handler.cpp
@@ -296,7 +296,7 @@
return ipmi::responseParmOutOfRange();
}
- std::variant<uint8_t> value = 0;
+ std::variant<uint8_t> value = static_cast<uint8_t>(0);
if (0 != mdrv2->sdplusMdrv2GetProperty("DirectoryEntries", value, service))
{
phosphor::logging::log<phosphor::logging::level::ERR>(