Clean-up: fix '-Wnused-parameter' warnings on various platforms
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 16 Mar 2022 15:57:24 +0000 (11:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Mar 2022 17:17:30 +0000 (13:17 -0400)
Change-Id: I35bd06414fd8407b2f281789ac2e419f40a08fa2
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/compat/fcntl.h
src/common/compat/poll.h
src/common/fd-tracker/utils-poll.cpp
src/common/runas.cpp
src/common/unix.cpp

index 5e566e500ffc76967230312d297aed927b3ed14e..9fca7f0cdc4699e8ed6155a08b6e7630d1417dfa 100644 (file)
@@ -37,8 +37,11 @@ extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
 #define SYNC_FILE_RANGE_WAIT_BEFORE   0
 #define SYNC_FILE_RANGE_WRITE         0
 
-static inline int lttng_sync_file_range(int fd, off64_t offset,
-               off64_t nbytes, unsigned int flags)
+static inline int lttng_sync_file_range(
+               int fd __attribute__((unused)),
+               off64_t offset __attribute__((unused)),
+               off64_t nbytes __attribute__((unused)),
+               unsigned int flags __attribute__((unused)))
 {
        return -ENOSYS;
 }
@@ -53,8 +56,13 @@ static inline int lttng_sync_file_range(int fd, off64_t offset,
 #define SPLICE_F_MORE       0
 #define SPLICE_F_GIFT       0
 
-static inline ssize_t splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out,
-               size_t len, unsigned int flags)
+static inline ssize_t splice(
+               int fd_in __attribute__((unused)),
+               loff_t *off_in __attribute__((unused)),
+               int fd_out __attribute__((unused)),
+               loff_t *off_out __attribute__((unused)),
+               size_t len __attribute__((unused)),
+               unsigned int flags __attribute__((unused)))
 {
        return -ENOSYS;
 }
index f9fb33fc9f8c2405bac7f1b999d05f5385799bce..cc2aab8f8fa50abde12b95763a23d60d89efb264 100644 (file)
@@ -354,7 +354,8 @@ extern int compat_poll_set_max_size(void);
 /*
  * No need to reset a pollfd structure for poll(2)
  */
-static inline void lttng_poll_reset(struct lttng_poll_event *events)
+static inline void lttng_poll_reset(
+               struct lttng_poll_event *events __attribute__((unused)))
 {}
 
 /*
index b1370c55d50878c3615bc292194fd489601b19ac..6ea088c03c49daac4a3ce57d63d03b9fda9484f5 100644 (file)
@@ -73,17 +73,19 @@ int fd_tracker_util_poll_clean(
  * The epoll variant of the poll compat layer creates an unsuspendable fd which
  * must be tracked.
  */
-int fd_tracker_util_poll_create(struct fd_tracker *tracker,
-               const char *name,
+int fd_tracker_util_poll_create(
+               struct fd_tracker *tracker __attribute__((unused)),
+               const char *name __attribute__((unused)),
                struct lttng_poll_event *events,
                int size,
-               int flags)
+               int flags __attribute__((unused)))
 {
        return lttng_poll_create(events, size, flags);
 }
 
 int fd_tracker_util_poll_clean(
-               struct fd_tracker *tracker, struct lttng_poll_event *events)
+               struct fd_tracker *tracker __attribute__((unused)),
+               struct lttng_poll_event *events)
 {
        lttng_poll_clean(events);
        return 0;
index ee3451321e7b8cbafb809fc4d3fe491cb6ee0a30..eae650ba5038b9a09ab028709adaad6f7b41dc89 100644 (file)
@@ -629,16 +629,18 @@ end:
 }
 #else
 static
-int _extract_elf_symbol_offset(struct run_as_data *data,
-               struct run_as_ret *ret_value)
+int _extract_elf_symbol_offset(
+               struct run_as_data *data __attribute__((unused)),
+               struct run_as_ret *ret_value __attribute__((unused)))
 {
        ERR("Unimplemented runas command RUN_AS_EXTRACT_ELF_SYMBOL_OFFSET");
        return -1;
 }
 
 static
-int _extract_sdt_probe_offsets(struct run_as_data *data,
-               struct run_as_ret *ret_value)
+int _extract_sdt_probe_offsets(
+               struct run_as_data *data __attribute__((unused)),
+               struct run_as_ret *ret_value __attribute__((unused)))
 {
        ERR("Unimplemented runas command RUN_AS_EXTRACT_SDT_PROBE_OFFSETS");
        return -1;
index beeb69572f8e48902f5dd2cb235ddc05bb683d18..4861b8ea139ae64b10bb4c0328bafc56d08587cc 100644 (file)
@@ -1150,7 +1150,7 @@ int lttcomm_setsockopt_creds_unix_sock(int sock)
        return ret;
 }
 #elif (defined(__FreeBSD__) || defined(__sun__) || defined(__APPLE__))
-int lttcomm_setsockopt_creds_unix_sock(int sock)
+int lttcomm_setsockopt_creds_unix_sock(int sock __attribute__((unused)))
 {
        return 0;
 }
This page took 0.02817 seconds and 4 git commands to generate.