There are 6 functions that were deprecated in OpenCL 1.2 and are marked deprecated in the macOS headers (without any way to disable the `deprecated` attribute other than `#pragma diagnostic ignored`).
Fixes these warnings: ``` ../dlls/opencl/unix_thunks.c:38:25: warning: 'clCreateImage2D' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations] 38 | *params->__retval = clCreateImage2D( params->context, params->flags, params->image_format, params->image_width, params->image_height, params->image_row_pitch, params->host_ptr, params->errcode_ret ); | ^ /Applications/Xcode26.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:1170:1: note: 'clCreateImage2D' has been explicitly marked deprecated here 1170 | clCreateImage2D(cl_context /* context */, | ^ ../dlls/opencl/unix_thunks.c:46:25: warning: 'clCreateImage3D' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations] 46 | *params->__retval = clCreateImage3D( params->context, params->flags, params->image_format, params->image_width, params->image_height, params->image_depth, params->image_row_pitch, params->image_slice_pitch, params->host_ptr, params->errcode_ret ); | ^ /Applications/Xcode26.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:1180:1: note: 'clCreateImage3D' has been explicitly marked deprecated here 1180 | clCreateImage3D(cl_context /* context */, | ^ ../dlls/opencl/unix_thunks.c:124:12: warning: 'clEnqueueBarrier' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations] 124 | return clEnqueueBarrier( params->command_queue ); | ^ /Applications/Xcode26.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:1201:1: note: 'clEnqueueBarrier' has been explicitly marked deprecated here 1201 | clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; | ^ ../dlls/opencl/unix_thunks.c:203:12: warning: 'clEnqueueMarker' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations] 203 | return clEnqueueMarker( params->command_queue, params->event ); | ^ /Applications/Xcode26.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:1192:1: note: 'clEnqueueMarker' has been explicitly marked deprecated here 1192 | clEnqueueMarker(cl_command_queue /* command_queue */, | ^ ../dlls/opencl/unix_thunks.c:266:12: warning: 'clEnqueueWaitForEvents' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations] 266 | return clEnqueueWaitForEvents( params->command_queue, params->num_events, params->event_list ); | ^ /Applications/Xcode26.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:1196:1: note: 'clEnqueueWaitForEvents' has been explicitly marked deprecated here 1196 | clEnqueueWaitForEvents(cl_command_queue /* command_queue */, | ^ ../dlls/opencl/unix_thunks.c:551:12: warning: 'clUnloadCompiler' is deprecated: first deprecated in macOS 10.8 [-Wdeprecated-declarations] 551 | return clUnloadCompiler(); | ^ /Applications/Xcode26.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:1204:1: note: 'clUnloadCompiler' has been explicitly marked deprecated here 1204 | clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; | ^ 6 warnings generated. ```
From: Brendan Shanks bshanks@codeweavers.com
--- dlls/opencl/make_opencl | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/opencl/make_opencl b/dlls/opencl/make_opencl index 73407873f21..1bc1b0f02c8 100755 --- a/dlls/opencl/make_opencl +++ b/dlls/opencl/make_opencl @@ -589,6 +589,11 @@ print UNIX <<EOF
#include "config.h" #include "unix_private.h" + +#ifdef __APPLE__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif EOF ;
@@ -599,6 +604,13 @@ foreach (sort keys %core_functions) print UNIX "\n", generate_unix_thunk( $_, $core_functions{$_} ); }
+print UNIX <<EOF +#ifdef __APPLE__ +#pragma clang diagnostic pop +#endif +EOF +; + print UNIX "\nconst unixlib_entry_t __wine_unix_call_funcs[] =\n{\n"; foreach (sort keys %core_functions) {