diff mbox series

[PULL,3/6] audio/mixeng: Do not declare unused variables

Message ID 20220318135634.2851040-4-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,1/6] ui/gtk: Ignore 2- and 3-button press events | expand

Commit Message

Gerd Hoffmann March 18, 2022, 1:56 p.m. UTC
From: Akihiko Odaki <akihiko.odaki@gmail.com>

The unused variables when FLOAT_MIXENG is defined caused warnings on
Apple clang version 13.1.6 (clang-1316.0.21.2).

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220316061053.60587-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 audio/mixeng.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/audio/mixeng.c b/audio/mixeng.c
index f27deb165b67..100a306d6fec 100644
--- a/audio/mixeng.c
+++ b/audio/mixeng.c
@@ -342,13 +342,13 @@  f_sample *mixeng_clip_float[2] = {
 void audio_sample_to_uint64(const void *samples, int pos,
                             uint64_t *left, uint64_t *right)
 {
+#ifdef FLOAT_MIXENG
+    error_report(
+        "Coreaudio and floating point samples are not supported by replay yet");
+    abort();
+#else
     const struct st_sample *sample = samples;
     sample += pos;
-#ifdef FLOAT_MIXENG
-    error_report(
-        "Coreaudio and floating point samples are not supported by replay yet");
-    abort();
-#else
     *left = sample->l;
     *right = sample->r;
 #endif
@@ -357,13 +357,13 @@  void audio_sample_to_uint64(const void *samples, int pos,
 void audio_sample_from_uint64(void *samples, int pos,
                             uint64_t left, uint64_t right)
 {
+#ifdef FLOAT_MIXENG
+    error_report(
+        "Coreaudio and floating point samples are not supported by replay yet");
+    abort();
+#else
     struct st_sample *sample = samples;
     sample += pos;
-#ifdef FLOAT_MIXENG
-    error_report(
-        "Coreaudio and floating point samples are not supported by replay yet");
-    abort();
-#else
     sample->l = left;
     sample->r = right;
 #endif