From 59478062d6e54361beb12c0790226f83ef65baf0 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 18 Apr 2024 10:31:34 +0200 Subject: [PATCH] Cleanup: Unused parameters and function warnings on macOS --- source/blender/editors/space_userpref/userpref_ops.cc | 6 ++++-- source/blender/windowmanager/intern/wm_platform.cc | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_userpref/userpref_ops.cc b/source/blender/editors/space_userpref/userpref_ops.cc index abcf7c8051e..5c2d18f21c7 100644 --- a/source/blender/editors/space_userpref/userpref_ops.cc +++ b/source/blender/editors/space_userpref/userpref_ops.cc @@ -785,10 +785,11 @@ static bool associate_blend_poll(bContext *C) #endif } +#if !defined(__APPLE__) static bool assosiate_blend(bool do_register, bool all_users, char **error_msg) { const bool result = WM_platform_assosiate_set(do_register, all_users, error_msg); -#ifdef WIN32 +# ifdef WIN32 if ((result == false) && /* For some reason the message box isn't shown in this case. */ (all_users == false)) @@ -797,9 +798,10 @@ static bool assosiate_blend(bool do_register, bool all_users, char **error_msg) "Unable to unregister file association"; MessageBox(0, msg, "Blender", MB_OK | MB_ICONERROR); } -#endif /* !WIN32 */ +# endif /* !WIN32 */ return result; } +#endif static int associate_blend_exec(bContext * /*C*/, wmOperator *op) { diff --git a/source/blender/windowmanager/intern/wm_platform.cc b/source/blender/windowmanager/intern/wm_platform.cc index 118c09bbf01..00e2d370fa4 100644 --- a/source/blender/windowmanager/intern/wm_platform.cc +++ b/source/blender/windowmanager/intern/wm_platform.cc @@ -51,6 +51,7 @@ bool WM_platform_assosiate_set(bool do_register, bool all_users, char **r_error_ } #elif defined(__APPLE__) /* Pass. */ + UNUSED_VARS(do_register, all_users); #else { BPy_RunErrInfo err_info = {}; -- 2.30.2