You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2024/07/09 18:49:45 UTC
(trafficserver) 12/15: Fix unused parameters in tscore/ink_cap (#11525)
This is an automated email from the ASF dual-hosted git repository.
cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 488ddbf50998cb3f25b982dfe87d2f6d2dde52ce
Author: Pavel Vazharov <pa...@x3me.net>
AuthorDate: Tue Jul 9 17:07:07 2024 +0300
Fix unused parameters in tscore/ink_cap (#11525)
- Use `/* name ATS_UNUSED */` for fully unused parameters
- Use `[[maybe_unused]] name` for conditionally unused parameters
(cherry picked from commit 6ac8f4b4637cb752b040edbbb940cab5e04682bd)
---
src/tscore/ink_cap.cc | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/tscore/ink_cap.cc b/src/tscore/ink_cap.cc
index a73bade397..ec86608f2a 100644
--- a/src/tscore/ink_cap.cc
+++ b/src/tscore/ink_cap.cc
@@ -86,7 +86,7 @@ ink_mutex ElevateAccess::lock = INK_MUTEX_INIT;
#if !HAVE_GETRESUID
static int
-getresuid(uid_t *uid, uid_t *euid, uid_t *suid)
+getresuid(uid_t *uid, uid_t *euid, uid_t * /* suid ATS_UNUSED */)
{
*uid = getuid();
*euid = geteuid();
@@ -96,7 +96,7 @@ getresuid(uid_t *uid, uid_t *euid, uid_t *suid)
#if !HAVE_GETRESGID
static int
-getresgid(gid_t *gid, gid_t *egid, gid_t *sgid)
+getresgid(gid_t *gid, gid_t *egid, gid_t * /* sgid ATS_UNUSED */)
{
*gid = getgid();
*egid = getegid();
@@ -333,7 +333,7 @@ RestrictCapabilities()
}
bool
-EnableCoreFile(bool flag)
+EnableCoreFile([[maybe_unused]] bool flag)
{
int zret = 0;
@@ -352,10 +352,8 @@ EnableCoreFile(bool flag)
}
void
-EnableDeathSignal(int signum)
+EnableDeathSignal([[maybe_unused]] int signum)
{
- (void)signum;
-
#if defined(PR_SET_PDEATHSIG)
if (prctl(PR_SET_PDEATHSIG, signum, 0, 0, 0) != 0) {
Debug("privileges", "prctl(PR_SET_PDEATHSIG) failed: %s", strerror(errno));