From 8c473df8c3b9e11ea794848fd8c5bd270500ecb2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 30 Nov 2023 10:48:33 +1100 Subject: [PATCH] Cleanup: suppress CLANG warnings, remove unused variables --- source/blender/draw/engines/eevee_next/eevee_lookdev.hh | 6 +++++- source/blender/draw/intern/draw_cache_impl_grease_pencil.cc | 4 ++-- source/blender/gpu/vulkan/vk_pipeline_state.cc | 3 +++ source/blender/python/bmesh/bmesh_py_types_customdata.cc | 2 -- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/source/blender/draw/engines/eevee_next/eevee_lookdev.hh b/source/blender/draw/engines/eevee_next/eevee_lookdev.hh index 3da740e521d..0ee8002a55a 100644 --- a/source/blender/draw/engines/eevee_next/eevee_lookdev.hh +++ b/source/blender/draw/engines/eevee_next/eevee_lookdev.hh @@ -86,7 +86,11 @@ class LookdevModule { Instance &inst_; public: - LookdevModule(Instance &inst) : inst_(inst){}; + LookdevModule(Instance &inst) : inst_(inst) + { + /* Suppress CLANG `-Wunused-private-field` warning. */ + (void)inst_; + }; /* TODO(fclem): This is where the lookdev balls display should go. */ }; diff --git a/source/blender/draw/intern/draw_cache_impl_grease_pencil.cc b/source/blender/draw/intern/draw_cache_impl_grease_pencil.cc index 0d76c436c10..def2b447974 100644 --- a/source/blender/draw/intern/draw_cache_impl_grease_pencil.cc +++ b/source/blender/draw/intern/draw_cache_impl_grease_pencil.cc @@ -386,7 +386,7 @@ static void grease_pencil_geom_batch_ensure(const GreasePencil &grease_pencil, c /* First, count how many vertices and triangles are needed for the whole object. Also record the * offsets into the curves for the vertices and triangles. */ - int total_points_num = 0; + // int total_points_num = 0; /* UNUSED. */ int total_verts_num = 0; int total_triangles_num = 0; int v_offset = 0; @@ -422,7 +422,7 @@ static void grease_pencil_geom_batch_ensure(const GreasePencil &grease_pencil, c v_offset += 1 + points.size() + (is_cyclic ? 1 : 0) + 1; } - total_points_num += curves.points_num(); + // total_points_num += curves.points_num(); /* UNUSED. */ /* One vertex is stored before and after as padding. Cyclic strokes have one extra vertex. */ total_verts_num += curves.points_num() + num_cyclic + curves.curves_num() * 2; diff --git a/source/blender/gpu/vulkan/vk_pipeline_state.cc b/source/blender/gpu/vulkan/vk_pipeline_state.cc index 42698df1022..42f6d2aa40f 100644 --- a/source/blender/gpu/vulkan/vk_pipeline_state.cc +++ b/source/blender/gpu/vulkan/vk_pipeline_state.cc @@ -44,6 +44,9 @@ VKPipelineStateManager::VKPipelineStateManager() current_.clip_distances = 0; current_.polygon_smooth = false; current_.line_smooth = false; + + /* Suppress CLANG `-Wunused-private-field` warning. */ + (void)current_mutable_; } void VKPipelineStateManager::set_state(const GPUState &state, const GPUStateMutable &mutable_state) diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.cc b/source/blender/python/bmesh/bmesh_py_types_customdata.cc index e6f8ecf3e45..ae2d71c8a2f 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.cc +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.cc @@ -94,8 +94,6 @@ PyDoc_STRVAR( "Accessor for :class:`BMLoopUV` UV (as a 2D Vector).\n\ntype: :class:`BMLayerCollection`"); PyDoc_STRVAR(bpy_bmlayeraccess_collection__skin_doc, "Accessor for skin layer.\n\ntype: :class:`BMLayerCollection`"); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__paint_mask_doc, - "Accessor for paint mask layer.\n\ntype: :class:`BMLayerCollection`"); #ifdef WITH_FREESTYLE PyDoc_STRVAR(bpy_bmlayeraccess_collection__freestyle_edge_doc, "Accessor for Freestyle edge layer.\n\ntype: :class:`BMLayerCollection`");