alsa-utils/0004-bat-use-ATTRIBUTE_UNUSED-instead-remove-argument-nam.patch
Takashi Iwai d6037a30b7 Accepting request 1108917 from home:tiwai:branches:multimedia:libs
- Update to alsa-utils 1.2.10:
  * MIDI 2.0 / UMP support for sequencer programs
  * nhlt: add nhlt-dmic-info utility
  * Build fixes and cleanups
  * speaker-test: allow large buffer and period time setup - up to 100 seconds
  * various topology fixes
  For details, see:
  https://www.alsa-project.org/wiki/Changes_v1.2.9_v1.2.10#alsa-utils
- Fix the builds with old gcc:
  0001-axfer-use-ATTRIBUTE_UNUSED-instead-remove-argument-n.patch
  0002-amidi-use-ATTRIBUTE_UNUSED-instead-remove-argument-n.patch
  0003-alsaloop-use-ATTRIBUTE_UNUSED-instead-remove-argumen.patch
  0004-bat-use-ATTRIBUTE_UNUSED-instead-remove-argument-nam.patch
  0005-seq-use-ATTRIBUTE_UNUSED-instead-remove-argument-nam.patch
  0006-alsaucm-use-ATTRIBUTE_UNUSED-instead-remove-argument.patch
  0007-topology-use-ATTRIBUTE_UNUSED-instead-remove-argumen.patch

OBS-URL: https://build.opensuse.org/request/show/1108917
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=207
2023-09-04 15:27:54 +00:00

64 lines
2.0 KiB
Diff

From 94eeb5a40f77e92624eb32d2e9c50b1cd9e4f837 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 4 Sep 2023 16:49:03 +0200
Subject: [PATCH] bat: use ATTRIBUTE_UNUSED instead remove argument name
We need to support older compilers than GCC 11.
Link: https://github.com/alsa-project/alsa-utils/issues/233
Fixes: b366875 ("bat: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
bat/bat.c | 3 ++-
bat/common.c | 3 ++-
bat/common.h | 5 +++++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/bat/bat.c b/bat/bat.c
index e88c65f72f49..ea04ed9c8813 100644
--- a/bat/bat.c
+++ b/bat/bat.c
@@ -158,7 +158,8 @@ static void get_format(struct bat *bat, char *optarg)
}
}
-static inline int thread_wait_completion(struct bat *, pthread_t id, int **val)
+static inline int thread_wait_completion(struct bat *bat ATTRIBUTE_UNUSED,
+ pthread_t id, int **val)
{
int err;
diff --git a/bat/common.c b/bat/common.c
index 9ff940572029..470a7e6ffc15 100644
--- a/bat/common.c
+++ b/bat/common.c
@@ -47,7 +47,8 @@ static int update_fmt_to_bat(struct bat *bat, struct chunk_fmt *fmt)
}
/* calculate frames and update to bat */
-static int update_frames_to_bat(struct bat *bat, struct wav_chunk_header *header, FILE *)
+static int update_frames_to_bat(struct bat *bat, struct wav_chunk_header *header,
+ FILE *file ATTRIBUTE_UNUSED)
{
/* The number of analyzed captured frames is arbitrarily set to half of
the number of frames of the wav file or the number of frames of the
diff --git a/bat/common.h b/bat/common.h
index a9bae5d2b741..bb51b0d452e2 100644
--- a/bat/common.h
+++ b/bat/common.h
@@ -13,6 +13,11 @@
*
*/
+#ifndef ATTRIBUTE_UNUSED
+/** do not print warning (gcc) when function parameter is not used */
+#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#endif
+
#define TEMP_RECORD_FILE_NAME "/tmp/bat.wav.XXXXXX"
#define DEFAULT_DEV_NAME "default"
--
2.35.3