Fix cppcheck warnings

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If5d808b9cb3bc733e7e21d546247d745ac5e1bf8
diff --git a/src/callback.hpp b/src/callback.hpp
index bc3ec48..732e671 100644
--- a/src/callback.hpp
+++ b/src/callback.hpp
@@ -38,7 +38,7 @@
      *     Signal: Callback is called as part of watch condition has been met.
      *
      */
-    virtual void operator()(Context ctx) = 0;
+    virtual void operator()(Context /* ctx */) = 0;
 
     /** @brief Run the callback.
      *  @param[in] ctx - caller context
@@ -47,7 +47,8 @@
      *     Signal: Callback is called as part of watch condition has been met.
      *  @param[in] msg - The sdbusplus signal message
      */
-    virtual void operator()(Context ctx, sdbusplus::message::message& msg){};
+    virtual void operator()(Context /* ctx */,
+                            sdbusplus::message::message& /* msg */){};
 };
 
 /** @class Conditional
@@ -237,7 +238,7 @@
             timer = std::make_unique<TimerType>(
                 sdeventplus::Event::get_default(),
                 // **INDENT-OFF**
-                [this](auto& source) {
+                [this](auto& /* source */) {
                     // The timer uses the context saved on timer enable
                     this->ConditionalCallback<CallbackAccess>::operator()(
                         this->ctx);
diff --git a/src/event_serialize.cpp b/src/event_serialize.cpp
index 9ff5308..d598bf4 100644
--- a/src/event_serialize.cpp
+++ b/src/event_serialize.cpp
@@ -29,7 +29,8 @@
  *                       a serialized data across code levels
  */
 template <class Archive>
-void save(Archive& archive, const Entry& event, const std::uint32_t version)
+void save(Archive& archive, const Entry& event,
+          const std::uint32_t /* version */)
 {
     archive(event.timestamp(), event.message(), event.additionalData());
 }
@@ -42,7 +43,7 @@
  *                       a serialized data across code levels
  */
 template <class Archive>
-void load(Archive& archive, Entry& event, const std::uint32_t version)
+void load(Archive& archive, Entry& event, const std::uint32_t /* version */)
 {
     using namespace sdbusplus::xyz::openbmc_project::Logging::server;
 
diff --git a/src/journal.cpp b/src/journal.cpp
index 09f98aa..f77293e 100644
--- a/src/journal.cpp
+++ b/src/journal.cpp
@@ -22,7 +22,7 @@
 namespace monitoring
 {
 
-void JournalBase::operator()(Context ctx)
+void JournalBase::operator()(Context /* ctx */)
 {
     for (const auto& n : index)
     {
diff --git a/src/method.hpp b/src/method.hpp
index 9aa86ba..db37d24 100644
--- a/src/method.hpp
+++ b/src/method.hpp
@@ -107,7 +107,7 @@
     {}
 
     /** @brief Callback interface implementation. */
-    void operator()(Context ctx) override
+    void operator()(Context /* ctx */) override
     {
         std::apply(detail::CallDBusMethod<DBusInterface, MethodArgs...>::op,
                    std::tuple_cat(std::make_tuple(bus), std::make_tuple(path),
diff --git a/src/resolve_errors.cpp b/src/resolve_errors.cpp
index 923529f..b48ca4f 100644
--- a/src/resolve_errors.cpp
+++ b/src/resolve_errors.cpp
@@ -36,7 +36,7 @@
 using EndpointList = std::vector<std::string>;
 using EndpointsProperty = std::variant<EndpointList>;
 
-void ResolveCallout::operator()(Context ctx)
+void ResolveCallout::operator()(Context /* ctx */)
 {
     // Resolve all errors for this callout:
     // 1) Read the 'endpoints' property for the callout/fault object
diff --git a/src/snmp_trap.hpp b/src/snmp_trap.hpp
index 34169b8..d21b805 100644
--- a/src/snmp_trap.hpp
+++ b/src/snmp_trap.hpp
@@ -62,14 +62,14 @@
     /** @brief Callback interface implementation.
      *  @param[in] ctc - context.
      */
-    void operator()(Context ctx)
+    void operator()(Context /* ctx */)
     {}
 
     /** @brief Callback interface implementation.
      *  @param[in] ctc - context.
      *  @param[in] msg - sdbus message.
      */
-    void operator()(Context ctx, sdbusplus::message::message& msg)
+    void operator()(Context /* ctx */, sdbusplus::message::message& msg)
     {
         event.trap(msg);
     }
diff --git a/src/tupleref.hpp b/src/tupleref.hpp
index 3954d46..dafd4f9 100644
--- a/src/tupleref.hpp
+++ b/src/tupleref.hpp
@@ -39,7 +39,7 @@
 template <size_t size, typename T, typename U>
 struct TupleOfRefsLess<size, size, T, U>
 {
-    static constexpr bool compare(const T& l, const U& r)
+    static constexpr bool compare(const T& /* l */, const U& /* r */)
     {
         return false;
     }
diff --git a/src/watch.hpp b/src/watch.hpp
index a44480c..c206316 100644
--- a/src/watch.hpp
+++ b/src/watch.hpp
@@ -39,7 +39,8 @@
     virtual void callback(Context ctx) = 0;
 
     /** @brief Invoke the callback associated with the watch. */
-    virtual void callback(Context ctx, sdbusplus::message::message& msg){};
+    virtual void callback(Context /* ctx */,
+                          sdbusplus::message::message& /* msg */){};
 };
 
 } // namespace monitoring