]> git.alsa-project.org Git - alsa-utils.git/commitdiff
axfer: use ATTRIBUTE_UNUSED instead remove argument name
authorJaroslav Kysela <perex@perex.cz>
Mon, 4 Sep 2023 14:33:47 +0000 (16:33 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 4 Sep 2023 14:33:47 +0000 (16:33 +0200)
We need to support older compilers than GCC 11.

Link: https://github.com/alsa-project/alsa-utils/issues/233
Fixes: ad5a1c0 ("axfer: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
axfer/container-raw.c
axfer/mapper-single.c
axfer/subcmd-list.c
axfer/subcmd-transfer.c
axfer/waiter-poll.c
axfer/waiter-select.c
axfer/waiter.h
axfer/xfer-libasound-irq-rw.c
axfer/xfer-libasound.c
axfer/xfer-options.c

index 071f94cb244a8bf13976b9fad5239c55eb62be7f..18860455c2ebf112f4cece4c4a08ba8fc6b91749 100644 (file)
 #include <sys/stat.h>
 #include <unistd.h>
 
-static int raw_builder_pre_process(struct container_context *,
-                                  snd_pcm_format_t *,
-                                  unsigned int *,
-                                  unsigned int *,
+static int raw_builder_pre_process(struct container_context *cntr ATTRIBUTE_UNUSED,
+                                  snd_pcm_format_t *format ATTRIBUTE_UNUSED,
+                                  unsigned int *samples_per_frame ATTRIBUTE_UNUSED,
+                                  unsigned int *frames_per_second ATTRIBUTE_UNUSED,
                                   uint64_t *byte_count)
 {
        *byte_count = UINT64_MAX;
@@ -25,9 +25,9 @@ static int raw_builder_pre_process(struct container_context *,
 }
 
 static int raw_parser_pre_process(struct container_context *cntr,
-                                 snd_pcm_format_t *,
-                                 unsigned int *,
-                                 unsigned int *,
+                                 snd_pcm_format_t *format ATTRIBUTE_UNUSED,
+                                 unsigned int *samples_per_frame ATTRIBUTE_UNUSED,
+                                 unsigned int *frames_per_second ATTRIBUTE_UNUSED,
                                  uint64_t *byte_count)
 {
        struct stat buf = {0};
index 13e7fc5cfd42353e6763a8bb8e1258e201a40f7a..f669f7fed54969509df2b5b64499ee78a11d82e6 100644 (file)
@@ -62,7 +62,7 @@ static void align_from_vector(void *frame_buf, unsigned int frame_count,
 
 static int single_pre_process(struct mapper_context *mapper,
                              struct container_context *cntrs,
-                             unsigned int)
+                             unsigned int cntr_count ATTRIBUTE_UNUSED)
 {
        struct single_state *state = mapper->private_data;
        unsigned int bytes_per_buffer;
@@ -110,7 +110,7 @@ static int single_muxer_process_frames(struct mapper_context *mapper,
                                       void *frame_buf,
                                       unsigned int *frame_count,
                                       struct container_context *cntrs,
-                                      unsigned int)
+                                      unsigned int cntr_count ATTRIBUTE_UNUSED)
 {
        struct single_state *state = mapper->private_data;
        void *src;
@@ -141,7 +141,7 @@ static int single_demuxer_process_frames(struct mapper_context *mapper,
                                         void *frame_buf,
                                         unsigned int *frame_count,
                                         struct container_context *cntrs,
-                                        unsigned int)
+                                        unsigned int cntr_count ATTRIBUTE_UNUSED)
 {
        struct single_state *state = mapper->private_data;
        void *dst;
index f9c8e0f931e183579d2f3aecf04a8ea08e9b6927..187e1d7ce4775272c9eef2b81f5b2439de84671d 100644 (file)
@@ -19,7 +19,7 @@ enum list_op {
 };
 
 static int dump_device(snd_ctl_t *handle, const char *id, const char *name,
-                      snd_pcm_stream_t, snd_pcm_info_t *info)
+                      snd_pcm_stream_t stream ATTRIBUTE_UNUSED, snd_pcm_info_t *info)
 {
        unsigned int i, count;
        int err;
index b39fde86ac82b5ae9456a4d094ac2a8945cf0e17..8d63043d15a590b900df23cfc8ed666e8e456989 100644 (file)
@@ -40,7 +40,7 @@ static void handle_unix_signal_for_finish(int sig)
        ctx_ptr->interrupted = true;
 }
 
-static void handle_unix_signal_for_suspend(int)
+static void handle_unix_signal_for_suspend(int sig ATTRIBUTE_UNUSED)
 {
        sigset_t curr, prev;
        struct sigaction sa = {0};
@@ -439,7 +439,7 @@ static int context_process_frames(struct context *ctx,
 }
 
 static void context_post_process(struct context *ctx,
-                                uint64_t)
+                                uint64_t accumulated_frame_count ATTRIBUTE_UNUSED)
 {
        uint64_t total_frame_count;
        unsigned int i;
index 31fab88717a9d1a1830a16229518137f801ad5d2..b81300cd6e93c473d821ff66ee9d4a128f94d5ba 100644 (file)
@@ -13,7 +13,7 @@
 #include <errno.h>
 #include <poll.h>
 
-static int poll_prepare(struct waiter_context *)
+static int poll_prepare(struct waiter_context *waiter ATTRIBUTE_UNUSED)
 {
        // Nothing to do because an instance of waiter has required data.
        return 0;
@@ -30,7 +30,7 @@ static int poll_wait_event(struct waiter_context *waiter, int timeout_msec)
        return err;
 }
 
-static void poll_release(struct waiter_context *)
+static void poll_release(struct waiter_context *waiter ATTRIBUTE_UNUSED)
 {
        // Nothing to do because an instance of waiter has required data.
        return;
index 164c9c8a1a2736a2d9880941940b75d05df591f8..fe19776bc1f3249d7392bdd5ed9fe184d9a4b221 100644 (file)
@@ -34,7 +34,7 @@ struct select_state {
        fd_set rfds_ex;
 };
 
-static int select_prepare(struct waiter_context *)
+static int select_prepare(struct waiter_context *waiter ATTRIBUTE_UNUSED)
 {
        return 0;
 }
@@ -94,7 +94,7 @@ static int select_wait_event(struct waiter_context *waiter, int timeout_msec)
        return err;
 }
 
-static void select_release(struct waiter_context *)
+static void select_release(struct waiter_context *waiter ATTRIBUTE_UNUSED)
 {
        return;
 }
index db18e33e337f5a3ddf4b8977d8fe7d3f4ae18e15..0f4e9b9f054834e4d86838817487f535dc65d5e4 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef __ALSA_UTILS_AXFER_WAITER__H_
 #define __ALSA_UTILS_AXFER_WAITER__H_
 
+#include <alsa/global.h>
 #include <poll.h>
 
 enum waiter_type {
index b7f0645e885ae7f80fe99f70e66d4d4a7021b014..45fb6d5ee3589d01c1b3ac2a7eada7ead778daef 100644 (file)
@@ -313,7 +313,7 @@ error:
 }
 
 static int w_process_frames_nonblocking(struct libasound_state *state,
-                                       snd_pcm_state_t,
+                                       snd_pcm_state_t pcm_state ATTRIBUTE_UNUSED,
                                        unsigned int *frame_count,
                                        struct mapper_context *mapper,
                                        struct container_context *cntrs)
index 9713533897a22cc346bc20dcc0922fe292fcb0e8..36ee08d7054bcecd7b96e76a1bf8354bcd88c56d 100644 (file)
@@ -60,7 +60,7 @@ static const struct option l_opts[] = {
 };
 
 static int xfer_libasound_init(struct xfer_context *xfer,
-                              snd_pcm_stream_t)
+                              snd_pcm_stream_t stream ATTRIBUTE_UNUSED)
 {
        struct libasound_state *state = xfer->private_data;
        int err;
@@ -887,7 +887,7 @@ static void xfer_libasound_destroy(struct xfer_context *xfer)
        state->log = NULL;
 }
 
-static void xfer_libasound_help(struct xfer_context *)
+static void xfer_libasound_help(struct xfer_context *xfer ATTRIBUTE_UNUSED)
 {
        printf(
 "      [BASICS]\n"
index 974570c817fe1a78249532e6431d8ed2193d4c1a..e716dede765c6491cb39749c6745a45e787c0c80 100644 (file)
@@ -447,7 +447,8 @@ static int generate_path_with_suffix(struct xfer_context *xfer,
 
 static int generate_path_without_suffix(struct xfer_context *xfer,
                                        const char *template,
-                                       unsigned int index, const char *)
+                                       unsigned int index,
+                                       const char *suffix ATTRIBUTE_UNUSED)
 {
        static const char *const single_format = "%s";
        static const char *const multiple_format = "%s-%i";