From: Michael Jeanson Date: Mon, 19 Apr 2021 19:47:50 +0000 (-0400) Subject: Fix warnings on FreeBSD X-Git-Tag: v2.13.0-rc1~80 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e2a195a6849f8d95a6583387b8ffbd8db8b95f9c;p=lttng-ust.git Fix warnings on FreeBSD Change-Id: I86e0ca340ceb479bf5443e72b1643f52467d8891 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/compat/futex.h b/src/common/compat/futex.h index 446c7f1c..71b98677 100644 --- a/src/common/compat/futex.h +++ b/src/common/compat/futex.h @@ -99,7 +99,9 @@ static inline int lttng_ust_futex_async(int32_t *uaddr, int op, int32_t val, #include static inline int lttng_ust_futex_async(int32_t *uaddr, int op, int32_t val, - const struct timespec *timeout, int32_t *uaddr2, int32_t val3) + const struct timespec *timeout, + int32_t *uaddr2 __attribute__((unused)), + int32_t val3 __attribute__((unused))) { int umtx_op; void *umtx_uaddr = NULL, *umtx_uaddr2 = NULL; diff --git a/src/lib/lttng-ust-common/lttng-ust-urcu.c b/src/lib/lttng-ust-common/lttng-ust-urcu.c index 4629067f..0f647556 100644 --- a/src/lib/lttng-ust-common/lttng-ust-urcu.c +++ b/src/lib/lttng-ust-common/lttng-ust-urcu.c @@ -52,8 +52,10 @@ void *mremap_wrapper(void *old_address, size_t old_size, * This is not generic. */ static -void *mremap_wrapper(void *old_address, size_t old_size, - size_t new_size, int flags) +void *mremap_wrapper(void *old_address __attribute__((unused)), + size_t old_size __attribute__((unused)), + size_t new_size __attribute__((unused)), + int flags) { assert(!(flags & MREMAP_MAYMOVE)); diff --git a/src/lib/lttng-ust-fork/ustfork.c b/src/lib/lttng-ust-fork/ustfork.c index 3eb62d2a..321ffc30 100644 --- a/src/lib/lttng-ust-fork/ustfork.c +++ b/src/lib/lttng-ust-fork/ustfork.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -403,7 +404,7 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid) pid_t rfork(int flags) { - static pid_t (*plibc_func)(void) = NULL; + static pid_t (*plibc_func)(int flags) = NULL; sigset_t sigset; pid_t retval; int saved_errno; @@ -419,7 +420,7 @@ pid_t rfork(int flags) lttng_ust_before_fork(&sigset); /* Do the real rfork */ - retval = plibc_func(); + retval = plibc_func(flags); saved_errno = errno; if (retval == 0) { /* child */ diff --git a/src/lib/lttng-ust/events.h b/src/lib/lttng-ust/events.h index cd64a2d8..bf76d7a3 100644 --- a/src/lib/lttng-ust/events.h +++ b/src/lib/lttng-ust/events.h @@ -190,10 +190,10 @@ void lttng_perf_counter_exit(void) #else /* #ifdef HAVE_LINUX_PERF_EVENT_H */ static inline -int lttng_add_perf_counter_to_ctx(uint32_t type, - uint64_t config, - const char *name, - struct lttng_ust_ctx **ctx) +int lttng_add_perf_counter_to_ctx(uint32_t type __attribute__((unused)), + uint64_t config __attribute__((unused)), + const char *name __attribute__((unused)), + struct lttng_ust_ctx **ctx __attribute__((unused))) { return -ENOSYS; }