From eb04e1a7538e765f0c19ca31bb79596e064aacd6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Apr 2024 10:55:18 +1100 Subject: [PATCH] Cleanup: quiet set-but-unused warnings --- source/blender/blenlib/intern/math_interp.cc | 1 + source/blender/editors/interface/interface_ops.cc | 2 ++ source/blender/editors/space_clip/clip_buttons.cc | 1 + .../blender/io/wavefront_obj/importer/obj_import_file_reader.cc | 1 + 4 files changed, 5 insertions(+) diff --git a/source/blender/blenlib/intern/math_interp.cc b/source/blender/blenlib/intern/math_interp.cc index d5aae4bcd5b..6e954c9808d 100644 --- a/source/blender/blenlib/intern/math_interp.cc +++ b/source/blender/blenlib/intern/math_interp.cc @@ -784,6 +784,7 @@ void BLI_ewa_filter(const int width, BLI_ewa_imp2radangle(A, B, C, F, &a, &b, &th, &ecc); if ((b2 = b * b) < rmin) { if ((a2 = a * a) < rmin) { + UNUSED_VARS(a2, b2); B = 0.0f; A = C = rmin; F = A * C; diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc index 97da819bf7f..751b7775475 100644 --- a/source/blender/editors/interface/interface_ops.cc +++ b/source/blender/editors/interface/interface_ops.cc @@ -106,6 +106,7 @@ static bool copy_data_path_button_poll(bContext *C) if (ptr.owner_id && ptr.data && prop) { if (const std::optional path = RNA_path_from_ID_to_property(&ptr, prop)) { + UNUSED_VARS(path); return true; } } @@ -194,6 +195,7 @@ static bool copy_as_driver_button_poll(bContext *C) (index >= 0 || !RNA_property_array_check(prop))) { if (const std::optional path = RNA_path_from_ID_to_property(&ptr, prop)) { + UNUSED_VARS(path); return true; } } diff --git a/source/blender/editors/space_clip/clip_buttons.cc b/source/blender/editors/space_clip/clip_buttons.cc index 9230cd93284..682e79d9b72 100644 --- a/source/blender/editors/space_clip/clip_buttons.cc +++ b/source/blender/editors/space_clip/clip_buttons.cc @@ -797,6 +797,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout, else { ofs += BLI_strncpy_rlen(str + ofs, RPT_(", failed to load"), sizeof(str) - ofs); } + UNUSED_VARS(ofs); uiItemL(col, str, ICON_NONE); diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc index 75b16432f38..78a30e6eb1f 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc @@ -99,6 +99,7 @@ static void geom_add_vertex(const char *p, const char *end, GlobalVertices &r_gl blocks.last().colors.append(linear); } } + UNUSED_VARS(p); } static void geom_add_mrgb_colors(const char *p, const char *end, GlobalVertices &r_global_vertices)