storagehandler: fix compile without open-power
When the `open-power` meson option is disabled, the code fails with
the following compile failure:
```
../storagehandler.cpp: In function ‘ipmi::RspType<short unsigned int> ipmiStorageAddSEL(uint16_t, uint8_t, uint32_t, uint16_t, uint8_t, uint8_t, uint8_t, uint8_t, std::array<unsigned char, 3>)’:
../storagehandler.cpp:685:27: error: unused variable ‘procedureType’ [-Werror=unused-variable]
685 | static constexpr auto procedureType = 0xDE;
| ^~~~~~~~~~~~~
../storagehandler.cpp:677:64: error: unused parameter ‘sensorType’ [-Werror=unused-parameter]
677 | [[maybe_unused]] uint8_t evmRev, uint8_t sensorType,
```
Add trivial changes to fix.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia7cc8dab700381c78461899bfc8c33d43cab3625
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 4a97b47..5239ee9 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -674,15 +674,18 @@
>
ipmiStorageAddSEL(uint16_t recordID, uint8_t recordType,
[[maybe_unused]] uint32_t timeStamp, uint16_t generatorID,
- [[maybe_unused]] uint8_t evmRev, uint8_t sensorType,
- uint8_t sensorNumber, uint8_t eventDir,
+ [[maybe_unused]] uint8_t evmRev,
+ [[maybe_unused]] uint8_t sensorType, uint8_t sensorNumber,
+ uint8_t eventDir,
std::array<uint8_t, eventDataSize> eventData)
{
std::string objpath;
static constexpr auto systemRecordType = 0x02;
+#ifdef OPEN_POWER_SUPPORT
// Hostboot sends SEL with OEM record type 0xDE to indicate that there is
// a maintenance procedure associated with eSEL record.
static constexpr auto procedureType = 0xDE;
+#endif
cancelSELReservation();
if (recordType == systemRecordType)
{