* [PATCH] audio/mixeng: Do not declare unused variables
@ 2022-03-16 6:10 Akihiko Odaki
2022-03-16 13:07 ` Philippe Mathieu-Daudé
2022-03-22 9:42 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Akihiko Odaki @ 2022-03-16 6:10 UTC (permalink / raw)
Cc: qemu-devel, Akihiko Odaki, Gerd Hoffmann
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>
---
audio/mixeng.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/audio/mixeng.c b/audio/mixeng.c
index f27deb165b6..100a306d6fe 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)
{
- 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
+ const struct st_sample *sample = samples;
+ sample += pos;
*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)
{
- 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
+ struct st_sample *sample = samples;
+ sample += pos;
sample->l = left;
sample->r = right;
#endif
--
2.32.0 (Apple Git-132)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] audio/mixeng: Do not declare unused variables
2022-03-16 6:10 [PATCH] audio/mixeng: Do not declare unused variables Akihiko Odaki
@ 2022-03-16 13:07 ` Philippe Mathieu-Daudé
2022-03-22 9:42 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-16 13:07 UTC (permalink / raw)
To: Akihiko Odaki; +Cc: qemu-devel, Gerd Hoffmann
On 16/3/22 07:10, Akihiko Odaki wrote:
> 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>
> ---
> audio/mixeng.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] audio/mixeng: Do not declare unused variables
2022-03-16 6:10 [PATCH] audio/mixeng: Do not declare unused variables Akihiko Odaki
2022-03-16 13:07 ` Philippe Mathieu-Daudé
@ 2022-03-22 9:42 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-22 9:42 UTC (permalink / raw)
To: Akihiko Odaki; +Cc: qemu-devel, Gerd Hoffmann
On 16/3/22 07:10, Akihiko Odaki wrote:
> 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>
> ---
> audio/mixeng.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
FWIW this patch is already in the tree as commit 832061a2fa.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-22 9:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-16 6:10 [PATCH] audio/mixeng: Do not declare unused variables Akihiko Odaki
2022-03-16 13:07 ` Philippe Mathieu-Daudé
2022-03-22 9:42 ` Philippe Mathieu-Daudé
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).