From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Akihiko Odaki" <akihiko.odaki@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PULL 3/6] audio/mixeng: Do not declare unused variables
Date: Fri, 18 Mar 2022 14:56:31 +0100 [thread overview]
Message-ID: <20220318135634.2851040-4-kraxel@redhat.com> (raw)
In-Reply-To: <20220318135634.2851040-1-kraxel@redhat.com>
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 --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
--
2.35.1
next prev parent reply other threads:[~2022-03-18 14:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 13:56 [PULL 0/6] Fixes 20220318 patches Gerd Hoffmann
2022-03-18 13:56 ` [PULL 1/6] ui/gtk: Ignore 2- and 3-button press events Gerd Hoffmann
2022-03-18 13:56 ` [PULL 2/6] ui: avoid unnecessary memory operations in vnc_refresh_server_surface() Gerd Hoffmann
2022-03-18 13:56 ` Gerd Hoffmann [this message]
2022-03-18 13:56 ` [PULL 4/6] hw/display/cirrus_vga: Clean up indentation in pci_cirrus_vga_realize() Gerd Hoffmann
2022-03-18 13:56 ` [PULL 5/6] hw/display: Allow vga_common_init() to return errors Gerd Hoffmann
2022-03-18 13:56 ` [PULL 6/6] hw/display/vga: Report a proper error when adding a 2nd ISA VGA Gerd Hoffmann
2022-03-19 14:16 ` [PULL 0/6] Fixes 20220318 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220318135634.2851040-4-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=akihiko.odaki@gmail.com \
--cc=f4bug@amsat.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).