This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 9fba149092 Fix unused parameters in the tscpp source code (#11402)
9fba149092 is described below

commit 9fba1490923c4396d7bf41aade1392517d796857
Author: Pavel Vazharov <pa...@x3me.net>
AuthorDate: Wed Jun 19 21:45:10 2024 +0300

    Fix unused parameters in the tscpp source code (#11402)
    
    * Fix unused parameters in the tscpp source code
    
    * Use ATS_UNUSED for the unused function parameters
    
    * Fix wrongly marked as unused parameter in Headers::count
---
 include/tscpp/api/Plugin.h            | 3 ++-
 src/tscpp/api/AsyncTimer.cc           | 2 +-
 src/tscpp/api/RemapPlugin.cc          | 2 +-
 src/tscpp/api/TransformationPlugin.cc | 2 +-
 src/tscpp/api/utils_internal.cc       | 4 ++--
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/tscpp/api/Plugin.h b/include/tscpp/api/Plugin.h
index c5cea6a64b..fcddf41ec1 100644
--- a/include/tscpp/api/Plugin.h
+++ b/include/tscpp/api/Plugin.h
@@ -157,7 +157,8 @@ public:
   /**
    * This method must be implemented when you hook HOOK_SELECT_ALT
    */
-  virtual void handleSelectAlt(const Request &clientReq, const Request 
&cachedReq, const Response &cachedResp) {};
+  virtual void handleSelectAlt(const Request & /* clientReq ATS_UNUSED */, 
const Request & /* cachedReq ATS_UNUSED */,
+                               const Response & /* cachedResp ATS_UNUSED */) 
{};
 
   virtual ~Plugin(){};
 
diff --git a/src/tscpp/api/AsyncTimer.cc b/src/tscpp/api/AsyncTimer.cc
index b1985be866..6e1b2fe175 100644
--- a/src/tscpp/api/AsyncTimer.cc
+++ b/src/tscpp/api/AsyncTimer.cc
@@ -48,7 +48,7 @@ struct atscppapi::AsyncTimerState {
 namespace
 {
 int
-handleTimerEvent(TSCont cont, TSEvent event, void *edata)
+handleTimerEvent(TSCont cont, TSEvent /* event ATS_UNUSED */, void * /* edata 
ATS_UNUSED */)
 {
   AsyncTimerState *state = static_cast<AsyncTimerState *>(TSContDataGet(cont));
   if (state->initial_timer_action_) {
diff --git a/src/tscpp/api/RemapPlugin.cc b/src/tscpp/api/RemapPlugin.cc
index 29aa151610..b8d56abe37 100644
--- a/src/tscpp/api/RemapPlugin.cc
+++ b/src/tscpp/api/RemapPlugin.cc
@@ -58,7 +58,7 @@ TSRemapDeleteInstance(void *ih)
 }
 
 TSReturnCode
-TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
+TSRemapInit(TSRemapInterface * /* api_info ATS_UNUSED */, char * /* errbuf 
ATS_UNUSED */, int /* errbuf_size ATS_UNUSED */)
 {
   return TS_SUCCESS;
 }
diff --git a/src/tscpp/api/TransformationPlugin.cc 
b/src/tscpp/api/TransformationPlugin.cc
index f9847c8da7..cb6147f32b 100644
--- a/src/tscpp/api/TransformationPlugin.cc
+++ b/src/tscpp/api/TransformationPlugin.cc
@@ -325,7 +325,7 @@ TransformationPlugin::resumeCont()
 }
 
 int
-ResumeAfterPauseCont::_run(TSEvent event, void *edata)
+ResumeAfterPauseCont::_run(TSEvent /* event ATS_UNUSED */, void * /* edata 
ATS_UNUSED */)
 {
   auto state     = static_cast<TransformationPluginState *>(this);
   state->paused_ = false;
diff --git a/src/tscpp/api/utils_internal.cc b/src/tscpp/api/utils_internal.cc
index f6f864a793..43fc176175 100644
--- a/src/tscpp/api/utils_internal.cc
+++ b/src/tscpp/api/utils_internal.cc
@@ -43,7 +43,7 @@ namespace
 int TRANSACTION_STORAGE_INDEX = -1;
 
 void
-resetTransactionHandles(Transaction &transaction, TSEvent event)
+resetTransactionHandles(Transaction &transaction, TSEvent /* event ATS_UNUSED 
*/)
 {
   utils::internal::resetTransactionHandles(transaction);
   return;
@@ -260,7 +260,7 @@ utils::internal::invokePluginForEvent(GlobalPlugin *plugin, 
TSHttpTxn ats_txn_ha
 }
 
 void
-utils::internal::invokePluginForEvent(GlobalPlugin *plugin, TSHttpAltInfo 
altinfo_handle, TSEvent event)
+utils::internal::invokePluginForEvent(GlobalPlugin *plugin, TSHttpAltInfo 
altinfo_handle, [[maybe_unused]] TSEvent event)
 {
   TSMBuffer hdr_buf;
   TSMLoc    hdr_loc;

Reply via email to