qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] coreaudio: Always return 0 in handle_voice_change
@ 2022-03-06 12:34 Akihiko Odaki
  2022-03-06 21:44 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Akihiko Odaki @ 2022-03-06 12:34 UTC (permalink / raw)
  Cc: Christian Schoenebeck, qemu Developers, Akihiko Odaki,
	Gerd Hoffmann

handle_voice_change() is a CoreAudio callback function as of CoreAudio type
AudioObjectPropertyListenerProc, and for the latter MacOSX.sdk/System/
Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h
says "The return value is currently unused and should always be 0.".

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
 audio/coreaudio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/audio/coreaudio.c b/audio/coreaudio.c
index 0f19d0ce01c..91445096358 100644
--- a/audio/coreaudio.c
+++ b/audio/coreaudio.c
@@ -540,7 +540,6 @@ static OSStatus handle_voice_change(
     const AudioObjectPropertyAddress *in_addresses,
     void *in_client_data)
 {
-    OSStatus status;
     coreaudioVoiceOut *core = in_client_data;
 
     qemu_mutex_lock_iothread();
@@ -549,13 +548,12 @@ static OSStatus handle_voice_change(
         fini_out_device(core);
     }
 
-    status = init_out_device(core);
-    if (!status) {
+    if (!init_out_device(core)) {
         update_device_playback_state(core);
     }
 
     qemu_mutex_unlock_iothread();
-    return status;
+    return 0;
 }
 
 static int coreaudio_init_out(HWVoiceOut *hw, struct audsettings *as,
-- 
2.32.0 (Apple Git-132)



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] coreaudio: Always return 0 in handle_voice_change
  2022-03-06 12:34 [PATCH v2] coreaudio: Always return 0 in handle_voice_change Akihiko Odaki
@ 2022-03-06 21:44 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-06 21:44 UTC (permalink / raw)
  To: Akihiko Odaki; +Cc: Christian Schoenebeck, qemu Developers, Gerd Hoffmann

On 6/3/22 13:34, Akihiko Odaki wrote:
> handle_voice_change() is a CoreAudio callback function as of CoreAudio type
> AudioObjectPropertyListenerProc, and for the latter MacOSX.sdk/System/
> Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h
> says "The return value is currently unused and should always be 0.".
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> ---
>   audio/coreaudio.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-06 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-06 12:34 [PATCH v2] coreaudio: Always return 0 in handle_voice_change Akihiko Odaki
2022-03-06 21:44 ` 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).