Fix warnings on FreeBSD
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 19 Apr 2021 19:47:50 +0000 (15:47 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 20 Apr 2021 14:06:03 +0000 (10:06 -0400)
Change-Id: I86e0ca340ceb479bf5443e72b1643f52467d8891
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/compat/futex.h
src/lib/lttng-ust-common/lttng-ust-urcu.c
src/lib/lttng-ust-fork/ustfork.c
src/lib/lttng-ust/events.h

index 446c7f1c56519227abbb28bc21deff70cd582d18..71b986774fe13d5be6662a5ef2a6a14c23cf3b4c 100644 (file)
@@ -99,7 +99,9 @@ static inline int lttng_ust_futex_async(int32_t *uaddr, int op, int32_t val,
 #include <sys/umtx.h>
 
 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;
index 4629067fff2c25878cfcd7f3dcc0afa600863519..0f647556f638dd3ac075c89b7cb5c5bd86896013 100644 (file)
@@ -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));
 
index 3eb62d2a296567b96ee118881dc92d372a36eb90..321ffc30c0fd993d7be43a62fa9063fbe3a2e5ca 100644 (file)
@@ -13,6 +13,7 @@
 #include <signal.h>
 #include <sched.h>
 #include <stdarg.h>
+#include <stdlib.h>
 #include <errno.h>
 
 #include <lttng/ust-fork.h>
@@ -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 */
index cd64a2d8ce8c894bbd570692805bd96a22a4ee0a..bf76d7a319344e06c945c7df945cefbfc80f0bb4 100644 (file)
@@ -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;
 }
This page took 0.028315 seconds and 4 git commands to generate.