Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plugins/cache_promote/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class PromotionPolicy
}

virtual bool
parseOption(int opt, char *optarg)
parseOption(int /* opt ATS_UNUSED */, char * /* optarg ATS_UNUSED */)
{
return false;
}
Expand All @@ -90,7 +90,7 @@ class PromotionPolicy

// Cleanup any internal state / memory that may be in use
virtual void
cleanup(TSHttpTxn txnp)
cleanup(TSHttpTxn /* txnp ATS_UNUSED */)
{
}

Expand All @@ -102,7 +102,7 @@ class PromotionPolicy
}

virtual void
addBytes(TSHttpTxn txnp)
addBytes(TSHttpTxn /* txnp ATS_UNUSED */)
{
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/cache_range_requests/cache_range_requests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ delete_pluginconfig(pluginconfig *const pc)
* Entry point when used as a global plugin.
*/
int
handle_read_request_header(TSCont txn_contp, TSEvent event, void *edata)
handle_read_request_header(TSCont /* txn_contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void *edata)
{
TSHttpTxn txnp = static_cast<TSHttpTxn>(edata);

Expand Down
6 changes: 3 additions & 3 deletions plugins/cachekey/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ setCacheKey(TSHttpTxn txn, Configs *config, TSRemapRequestInfo *rri = nullptr)
}

static int
contSetCachekey(TSCont contp, TSEvent event, void *edata)
contSetCachekey(TSCont /* contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void *edata)
{
TSHttpTxn txn = static_cast<TSHttpTxn>(edata);

Expand Down Expand Up @@ -130,7 +130,7 @@ TSPluginInit(int argc, const char *argv[])
* @return always TS_SUCCESS.
*/
TSReturnCode
TSRemapInit(TSRemapInterface *apiInfo, char *errBuf, int erroBufSize)
TSRemapInit(TSRemapInterface * /* apiInfo ATS_UNUSED */, char * /* errBuf ATS_UNUSED */, int /* erroBufSize ATS_UNUSED */)
{
return TS_SUCCESS;
}
Expand All @@ -147,7 +147,7 @@ TSRemapInit(TSRemapInterface *apiInfo, char *errBuf, int erroBufSize)
* @return TS_SUCCES if success or TS_ERROR if failure
*/
TSReturnCode
TSRemapNewInstance(int argc, char *argv[], void **instance, char *errBuf, int errBufSize)
TSRemapNewInstance(int argc, char *argv[], void **instance, char * /* errBuf ATS_UNUSED */, int /* errBufSize ATS_UNUSED */)
{
Configs *config = new Configs();
if (nullptr != config && config->init(argc, const_cast<const char **>(argv), /* perRemapConfig */ true)) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/certifier/certifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ mkcrt(const std::string &commonName, int serial)
}

static int
shadow_cert_generator(TSCont contp, TSEvent event, void *edata)
shadow_cert_generator(TSCont contp, TSEvent /* event ATS_UNUSED */, void * /* edata ATS_UNUSED */)
{
const char *servername = reinterpret_cast<const char *>(TSContDataGet(contp));
std::string commonName(servername);
Expand Down Expand Up @@ -523,7 +523,7 @@ shadow_cert_generator(TSCont contp, TSEvent event, void *edata)

/// Callback at TS_SSL_CERT_HOOK, generate/look up shadow certificates based on SNI/FQDN
static int
cert_retriever(TSCont contp, TSEvent event, void *edata)
cert_retriever(TSCont /* contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void *edata)
{
TSVConn ssl_vc = reinterpret_cast<TSVConn>(edata);
TSSslConnection sslobj = TSVConnSslConnectionGet(ssl_vc);
Expand Down
4 changes: 2 additions & 2 deletions plugins/compress/compress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
}

TSReturnCode
TSRemapNewInstance(int argc, char *argv[], void **instance, char *errbuf, int errbuf_size)
TSRemapNewInstance(int argc, char *argv[], void **instance, char * /* errbuf ATS_UNUSED */, int /* errbuf_size ATS_UNUSED */)
{
info("Instantiating a new compress plugin remap rule");
info("Reading config from file = %s", argv[2]);
Expand Down Expand Up @@ -1094,7 +1094,7 @@ TSRemapDeleteInstance(void *instance)
}

TSRemapStatus
TSRemapDoRemap(void *instance, TSHttpTxn txnp, TSRemapRequestInfo *rri)
TSRemapDoRemap(void *instance, TSHttpTxn txnp, TSRemapRequestInfo * /* rri ATS_UNUSED */)
{
if (nullptr == instance) {
info("No Rules configured, falling back to default");
Expand Down
7 changes: 4 additions & 3 deletions plugins/esi/combo_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ writeErrorResponse(InterceptData &int_data, int &n_bytes_written)
}

TSRemapStatus
TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
TSRemapDoRemap(void * /* ih ATS_UNUSED */, TSHttpTxn rh, TSRemapRequestInfo * /* rri ATS_UNUSED */)
{
TSUserArgSet(rh, arg_idx, (void *)1); /* Save for later hooks */
return TSREMAP_NO_REMAP; /* Continue with next remap plugin in chain */
Expand Down Expand Up @@ -1250,7 +1250,8 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
}

TSReturnCode
TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_size)
TSRemapNewInstance(int /* argc ATS_UNUSED */, char *argv[], void **ih, char * /* errbuf ATS_UNUSED */,
int /* errbuf_size ATS_UNUSED */)
{
*ih = nullptr;

Expand All @@ -1259,7 +1260,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s
}

void
TSRemapDeleteInstance(void *ih)
TSRemapDeleteInstance(void * /* ih ATS_UNUSED */)
{
return;
}
5 changes: 3 additions & 2 deletions plugins/esi/test/TestHttpDataFetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ class TestHttpDataFetcher : public HttpDataFetcher
public:
TestHttpDataFetcher() {}
bool
addFetchRequest(const std::string &url, FetchedDataProcessor *callback_obj = nullptr) override
addFetchRequest(const std::string & /* url ATS_UNUSED */,
FetchedDataProcessor * /* callback_obj ATS_UNUSED */ = nullptr) override
{
++_n_pending_requests;
return true;
}

DataStatus
getRequestStatus(const std::string &url) const override
getRequestStatus(const std::string & /* url ATS_UNUSED */) const override
{
if (_return_data) {
return STATUS_DATA_AVAILABLE;
Expand Down
6 changes: 3 additions & 3 deletions plugins/experimental/access_control/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class AccessControlTxnData
* @return always TS_SUCCESS.
*/
TSReturnCode
TSRemapInit(TSRemapInterface *apiInfo, char *errBuf, int erroBufSize)
TSRemapInit(TSRemapInterface * /* apiInfo ATS_UNUSED */, char * /* errBuf ATS_UNUSED */, int /* erroBufSize ATS_UNUSED */)
{
return TS_SUCCESS;
}
Expand All @@ -117,7 +117,7 @@ TSRemapInit(TSRemapInterface *apiInfo, char *errBuf, int erroBufSize)
* @return TS_SUCCES if success or TS_ERROR if failure
*/
TSReturnCode
TSRemapNewInstance(int argc, char *argv[], void **instance, char *errBuf, int errBufSize)
TSRemapNewInstance(int argc, char *argv[], void **instance, char * /* errBuf ATS_UNUSED */, int /* errBufSize ATS_UNUSED */)
{
AccessControlConfig *config = new AccessControlConfig();
if (nullptr != config && config->init(argc, argv)) {
Expand Down Expand Up @@ -229,7 +229,7 @@ nextDuplicate(TSMBuffer buffer, TSMLoc hdr, TSMLoc field)
* @note Add the cookies to "hier-part" (RFC 3986), always sort them in the cache key.
*/
bool
getCookieByName(TSHttpTxn txn, TSMBuffer buf, TSMLoc hdrs, const String &cookieName, String &cookieValue)
getCookieByName(TSHttpTxn /* txn ATS_UNUSED */, TSMBuffer buf, TSMLoc hdrs, const String &cookieName, String &cookieValue)
{
TSMLoc field;

Expand Down
4 changes: 2 additions & 2 deletions plugins/experimental/access_control/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ cryptoErrStr(char *buffer, size_t bufferLen)
*/
size_t
cryptoMessageDigestGet(const char *digestType, const char *data, size_t dataLen, const char *key, size_t keyLen, char *out,
size_t outLen)
size_t /* outLen ATS_UNUSED */)
{
#ifndef HAVE_HMAC_CTX_NEW
HMAC_CTX ctx[1];
Expand Down Expand Up @@ -288,7 +288,7 @@ cryptoBase64EncodedSize(size_t decodedSize)
* @return output buffer size
*/
size_t
cryptoBase64DecodeSize(const char *encoded, size_t encodedLen)
cryptoBase64DecodeSize(const char * /* encoded ATS_UNUSED */, size_t encodedLen)
{
return ats_base64_decode_dstlen(encodedLen);
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/experimental/block_errors/block_errors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static bool enabled = true;

//-------------------------------------------------------------------------
static int
msg_hook(TSCont *contp, TSEvent event, void *edata)
msg_hook(TSCont * /* contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void *edata)
{
TSPluginMsg *msg = static_cast<TSPluginMsg *>(edata);
std::string_view tag(static_cast<const char *>(msg->tag));
Expand Down Expand Up @@ -151,7 +151,7 @@ IPTable ip_table;

//-------------------------------------------------------------------------
static int
handle_start_hook(TSCont *contp, TSEvent event, void *edata)
handle_start_hook(TSCont * /* contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void *edata)
{
Dbg(dbg_ctl, "handle_start_hook");
auto vconn = static_cast<TSVConn>(edata);
Expand Down Expand Up @@ -209,7 +209,7 @@ struct Errors {

//-------------------------------------------------------------------------
static int
handle_close_hook(TSCont *contp, TSEvent event, void *edata)
handle_close_hook(TSCont * /* contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void *edata)
{
Dbg(dbg_ctl, "handle_close_hook");
auto txnp = static_cast<TSHttpTxn>(edata);
Expand Down Expand Up @@ -255,7 +255,7 @@ handle_close_hook(TSCont *contp, TSEvent event, void *edata)

//-------------------------------------------------------------------------
static int
clean_table(TSCont *contp, TSEvent event, void *edata)
clean_table(TSCont * /* contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void * /* edata ATS_UNUSED */)
{
ip_table.clean();
return 0;
Expand Down
5 changes: 3 additions & 2 deletions plugins/experimental/cache_fill/cache_fill.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ cont_check_cacheable(TSHttpTxn txnp)
// if a background fetch is allowed for this request
//
static int
cont_handle_cache(TSCont contp, TSEvent event, void *edata)
cont_handle_cache(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
{
TSHttpTxn txnp = static_cast<TSHttpTxn>(edata);
if (TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE == event) {
Expand Down Expand Up @@ -147,7 +147,8 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
// We don't have any specific "instances" here, at least not yet.
//
TSReturnCode
TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf */, int /* errbuf_size */)
TSRemapNewInstance(int /* argc ATS_UNUSED */, char ** /* argv ATS_UNUSED */, void **ih, char * /* errbuf ATS_UNUSED */,
int /* errbuf_size ATS_UNUSED */)
{
TSCont cont = TSContCreate(cont_handle_cache, nullptr);
*ih = cont;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ CB_context_dump(TSCont, TSEvent, void *edata)
}

void
TSPluginInit(int argc, const char *argv[])
TSPluginInit(int /* argc ATS_UNUSED */, const char ** /* argv ATS_UNUSED */)
{
TSPluginRegistrationInfo info;

Expand Down
4 changes: 2 additions & 2 deletions plugins/experimental/cookie_remap/cookie_remap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -896,15 +896,15 @@ using OpsQueue = std::vector<const op *>;
//----------------------------------------------------------------------------
// init
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;
}

//----------------------------------------------------------------------------
// initialization of structures from config parameters
TSReturnCode
TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_size)
TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf ATS_UNUSED */, int /* errbuf_size ATS_UNUSED */)
{
if (argc != 3) {
TSError("arguments not equal to 3: %d", argc);
Expand Down
6 changes: 3 additions & 3 deletions plugins/experimental/fq_pacing/fq_pacing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fq_is_default_qdisc()
}

void
TSPluginInit(int argc, const char *argv[])
TSPluginInit(int /* argc ATS_UNUSED */, const char ** /* argv ATS_UNUSED */)
{
TSPluginRegistrationInfo info;

Expand Down Expand Up @@ -171,7 +171,7 @@ TSRemapDeleteInstance(void *instance)
}

static int
reset_pacing_cont(TSCont contp, TSEvent event, void *edata)
reset_pacing_cont(TSCont contp, TSEvent /* event ATS_UNUSED */, void *edata)
{
TSHttpTxn txnp = static_cast<TSHttpTxn>(edata);
auto txn_data = static_cast<fq_pacing_cont_t *>(TSContDataGet(contp));
Expand All @@ -197,7 +197,7 @@ reset_pacing_cont(TSCont contp, TSEvent event, void *edata)
}

TSRemapStatus
TSRemapDoRemap(void *instance, TSHttpTxn txnp, TSRemapRequestInfo *rri)
TSRemapDoRemap(void *instance, TSHttpTxn txnp, TSRemapRequestInfo * /* rri ATS_UNUSED */)
{
if (TSHttpTxnClientProtocolStackContains(txnp, TS_PROTO_TAG_HTTP_2_0) != nullptr) {
Dbg(dbg_ctl, "Skipping plugin execution for HTTP/2 requests");
Expand Down
4 changes: 2 additions & 2 deletions plugins/experimental/geoip_acl/acl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ Acl::init()
}

int
Acl::country_id_by_code(const std::string &str) const
Acl::country_id_by_code(const std::string & /* str ATS_UNUSED */) const
{
return -1;
}

int
Acl::country_id_by_addr(const sockaddr *addr) const
Acl::country_id_by_addr(const sockaddr * /* addr ATS_UNUSED */) const
{
return -1;
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/experimental/header_freq/header_freq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Log_Data(std::ostream &ss)
* the origin headers.
*/
int
CB_Command_Log(TSCont contp, TSEvent event, void *edata)
CB_Command_Log(TSCont contp, TSEvent /* event ATS_UNUSED */, void * /* edata ATS_UNUSED */)
{
std::string *command = static_cast<std::string *>(TSContDataGet(contp));
if (nullptr == command) {
Expand Down Expand Up @@ -224,7 +224,7 @@ handle_header_event(TSHttpTxn txnp, TSEvent event, CountMap_t &freq_map)
* SEND_RESPONSE_HDR hooks.
*/
int
header_handle_hook(TSCont contp, TSEvent event, void *edata)
header_handle_hook(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
{
TSHttpTxn txnp = reinterpret_cast<TSHttpTxn>(edata);
int ret_val = TS_SUCCESS;
Expand All @@ -251,7 +251,7 @@ header_handle_hook(TSCont contp, TSEvent event, void *edata)
* header stats.
*/
int
msg_handle_hook(TSCont contp, TSEvent event, void *edata)
msg_handle_hook(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
{
switch (event) {
case TS_EVENT_LIFECYCLE_MSG: // Handle external command
Expand Down Expand Up @@ -286,7 +286,7 @@ msg_handle_hook(TSCont contp, TSEvent event, void *edata)

/// Registration entry point for plugin.
void
TSPluginInit(int argc, const char *argv[])
TSPluginInit(int /* argc ATS_UNUSED */, const char ** /* argv ATS_UNUSED */)
{
Dbg(dbg_ctl_init, "initializing plugin");

Expand Down
4 changes: 2 additions & 2 deletions plugins/experimental/hook-trace/hook-trace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ countof(const T (&)[N])
}

static int
HttpHookTracer(TSCont contp, TSEvent event, void *edata)
HttpHookTracer(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
{
union {
TSHttpTxn txn;
Expand Down Expand Up @@ -124,7 +124,7 @@ HttpHookTracer(TSCont contp, TSEvent event, void *edata)
}

static int
LifecycleHookTracer(TSCont contp, TSEvent event, void *edata)
LifecycleHookTracer(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
{
switch (event) {
case TS_EVENT_LIFECYCLE_PORTS_INITIALIZED:
Expand Down
Loading