[Webkit-unassigned] [Bug 279534] New: Fix -Wcast-function-type-mismatch in CoreAudioSharedUnit.mm
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 11 12:20:24 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=279534
Bug ID: 279534
Summary: Fix -Wcast-function-type-mismatch in
CoreAudioSharedUnit.mm
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Media
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ddkilzer at webkit.org
Fix -Wcast-function-type-mismatch in CoreAudioSharedUnit.mm.
The static speechActivityListenerCallback() function has a `void` return type, but `AudioObjectPropertyListenerProc` has an `int` return type.
Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.mm:68:92: error: cast from 'void (*)(AudioObjectID, UInt32, const AudioObjectPropertyAddress *, void *)' (aka 'void (*)(unsigned int, unsigned int, const AudioObjectPropertyAddress *, void *)') to 'AudioObjectPropertyListenerProc' (aka 'int (*)(unsigned int, unsigned int, const AudioObjectPropertyAddress * _Nonnull, void * _Nullable)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
68 | error = AudioObjectRemovePropertyListener(deviceID, &kVoiceActivityDetectionState, (AudioObjectPropertyListenerProc)speechActivityListenerCallback, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.mm:73:85: error: cast from 'void (*)(AudioObjectID, UInt32, const AudioObjectPropertyAddress *, void *)' (aka 'void (*)(unsigned int, unsigned int, const AudioObjectPropertyAddress *, void *)') to 'AudioObjectPropertyListenerProc' (aka 'int (*)(unsigned int, unsigned int, const AudioObjectPropertyAddress * _Nonnull, void * _Nullable)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
73 | error = AudioObjectAddPropertyListener(deviceID, &kVoiceActivityDetectionState, (AudioObjectPropertyListenerProc)speechActivityListenerCallback, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240911/fdbab4e0/attachment.htm>
More information about the webkit-unassigned
mailing list