Proper handling for unused parameters
Instead of ignoring the parameter warning via a compile flag we can
explicitly not give the parameter a valiable name. The compile will then
know that that the parameter is not expected to be used.
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: Idfc9c7b2ac9e2f6a3d220540a354b1b8e890bee8
diff --git a/attn/attn_logging.cpp b/attn/attn_logging.cpp
index a55ac55..48ee5be 100644
--- a/attn/attn_logging.cpp
+++ b/attn/attn_logging.cpp
@@ -476,16 +476,6 @@
}
}
-/** @brief Commit checkstop event to log */
-void eventCheckstop(std::map<std::string, std::string>& i_errors)
-{
- // Additional data for log
- std::map<std::string, std::string> additionalData;
-
- // Create log event with additional data and FFDC data
- event(EventType::Checkstop, additionalData, createFFDCFiles(nullptr, 0));
-}
-
/**
* Commit special attention TI event to log
*
@@ -514,23 +504,6 @@
}
/**
- * Commit analyzer failure event to log
- *
- * Create an event log containing the specified error code.
- *
- * @param i_error - Error code
- */
-void eventHwDiagsFail(int i_error)
-{
- // Additiona data for log
- std::map<std::string, std::string> additionalData;
- additionalData["ERROR_CODE"] = std::to_string(i_error);
-
- // Create log event with additional data and FFDC data
- event(EventType::HwDiagsFail, additionalData, createFFDCFiles(nullptr, 0));
-}
-
-/**
* Commit attention handler failure event to log
*
* Create an event log containing the specified error code.
@@ -562,11 +535,12 @@
{
const char* data{nullptr};
size_t length{0};
- size_t prefix{0};
// get field value
if (0 == sd_journal_get_data(journal, field, (const void**)&data, &length))
{
+ size_t prefix{0};
+
// The data returned by sd_journal_get_data will be prefixed with the
// field name and "="
const void* eq = memchr(data, '=', length);