WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
279534
Fix -Wcast-function-type-mismatch in CoreAudioSharedUnit.mm
https://bugs.webkit.org/show_bug.cgi?id=279534
Summary
Fix -Wcast-function-type-mismatch in CoreAudioSharedUnit.mm
David Kilzer (:ddkilzer)
Reported
2024-09-11 12:20:24 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-09-11 12:20:44 PDT
<
rdar://problem/135818490
>
David Kilzer (:ddkilzer)
Comment 2
2024-09-11 12:26:41 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/33483
David Kilzer (:ddkilzer)
Comment 3
2024-09-12 18:49:59 PDT
Committed
283590@main
(28185c7):
https://commits.webkit.org/283590@main
Reviewed commits have been landed. Closing PR #33483 and removing active labels.
EWS
Comment 4
2024-09-18 17:02:43 PDT
Committed
283286.80@safari-7620-branch
(5bf73d15c55b): <
https://commits.webkit.org/283286.80@safari-7620-branch
> Reviewed commits have been landed. Closing PR #1826 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug