diff options
Diffstat (limited to 'source/blender/blenkernel')
43 files changed, 179 insertions, 193 deletions
diff --git a/source/blender/blenkernel/BKE_image_partial_update.hh b/source/blender/blenkernel/BKE_image_partial_update.hh index 6611efe7a61..b9b748880bb 100644 --- a/source/blender/blenkernel/BKE_image_partial_update.hh +++ b/source/blender/blenkernel/BKE_image_partial_update.hh @@ -122,11 +122,11 @@ class AbstractTileData { */ class NoTileData : AbstractTileData { public: - NoTileData(Image *UNUSED(image), ImageUser *UNUSED(image_user)) + NoTileData(Image * /*image*/, ImageUser * /*image_user*/) { } - void init_data(TileNumber UNUSED(new_tile_number)) override + void init_data(TileNumber /*new_tile_number*/) override { } diff --git a/source/blender/blenkernel/intern/asset.cc b/source/blender/blenkernel/intern/asset.cc index 9d9ed219cbb..67802b1d6b4 100644 --- a/source/blender/blenkernel/intern/asset.cc +++ b/source/blender/blenkernel/intern/asset.cc @@ -143,7 +143,7 @@ IDProperty *BKE_asset_metadata_idprop_find(const AssetMetaData *asset_data, cons /* Queries -------------------------------------------- */ -PreviewImage *BKE_asset_metadata_preview_get_from_id(const AssetMetaData *UNUSED(asset_data), +PreviewImage *BKE_asset_metadata_preview_get_from_id(const AssetMetaData * /*asset_data*/, const ID *id) { return BKE_previewimg_id_get(id); diff --git a/source/blender/blenkernel/intern/attribute_access_intern.hh b/source/blender/blenkernel/intern/attribute_access_intern.hh index 5fbca283399..33d415f1e0e 100644 --- a/source/blender/blenkernel/intern/attribute_access_intern.hh +++ b/source/blender/blenkernel/intern/attribute_access_intern.hh @@ -334,7 +334,7 @@ class ComponentAttributeProviders { namespace attribute_accessor_functions { template<const ComponentAttributeProviders &providers> -inline bool is_builtin(const void *UNUSED(owner), const AttributeIDRef &attribute_id) +inline bool is_builtin(const void * /*owner*/, const AttributeIDRef &attribute_id) { if (!attribute_id.is_named()) { return false; diff --git a/source/blender/blenkernel/intern/brush.cc b/source/blender/blenkernel/intern/brush.cc index 7261e0a5869..20d86ea5a2d 100644 --- a/source/blender/blenkernel/intern/brush.cc +++ b/source/blender/blenkernel/intern/brush.cc @@ -56,7 +56,7 @@ static void brush_init_data(ID *id) BKE_brush_curve_preset(brush, CURVE_PRESET_SMOOTH); } -static void brush_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag) +static void brush_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int flag) { Brush *brush_dst = (Brush *)id_dst; const Brush *brush_src = (const Brush *)id_src; diff --git a/source/blender/blenkernel/intern/bvhutils.cc b/source/blender/blenkernel/intern/bvhutils.cc index 9bea8a0d6d3..58b377eecdb 100644 --- a/source/blender/blenkernel/intern/bvhutils.cc +++ b/source/blender/blenkernel/intern/bvhutils.cc @@ -178,7 +178,7 @@ static void bvhtree_balance(BVHTree *tree, const bool isolate) /* Math stuff for ray casting on mesh faces and for nearest surface */ float bvhtree_ray_tri_intersection(const BVHTreeRay *ray, - const float UNUSED(m_dist), + const float /*m_dist*/, const float v0[3], const float v1[3], const float v2[3]) @@ -1136,7 +1136,7 @@ BVHTree *bvhtree_from_mesh_looptri_ex(BVHTreeFromMesh *data, static BLI_bitmap *loose_verts_map_get(const MEdge *medge, int edges_num, - const MVert *UNUSED(mvert), + const MVert * /*mvert*/, int verts_num, int *r_loose_vert_num) { diff --git a/source/blender/blenkernel/intern/cryptomatte.cc b/source/blender/blenkernel/intern/cryptomatte.cc index e5f85f6aecf..5ba56946d8d 100644 --- a/source/blender/blenkernel/intern/cryptomatte.cc +++ b/source/blender/blenkernel/intern/cryptomatte.cc @@ -580,7 +580,7 @@ blender::StringRef CryptomatteStampDataCallbackData::extract_layer_hash(blender: void CryptomatteStampDataCallbackData::extract_layer_names(void *_data, const char *propname, char *propvalue, - int UNUSED(len)) + int /*len*/) { CryptomatteStampDataCallbackData *data = static_cast<CryptomatteStampDataCallbackData *>(_data); @@ -598,7 +598,7 @@ void CryptomatteStampDataCallbackData::extract_layer_names(void *_data, void CryptomatteStampDataCallbackData::extract_layer_manifest(void *_data, const char *propname, char *propvalue, - int UNUSED(len)) + int /*len*/) { CryptomatteStampDataCallbackData *data = static_cast<CryptomatteStampDataCallbackData *>(_data); diff --git a/source/blender/blenkernel/intern/cryptomatte_test.cc b/source/blender/blenkernel/intern/cryptomatte_test.cc index bb09b276645..8d360677599 100644 --- a/source/blender/blenkernel/intern/cryptomatte_test.cc +++ b/source/blender/blenkernel/intern/cryptomatte_test.cc @@ -88,10 +88,10 @@ TEST(cryptomatte, extract_layer_hash_from_metadata_key) "cryptomatte/")); } -static void validate_cryptomatte_session_from_stamp_data(void *UNUSED(data), +static void validate_cryptomatte_session_from_stamp_data(void * /*data*/, const char *propname, char *propvalue, - int UNUSED(len)) + int /*len*/) { blender::StringRefNull prop_name(propname); if (!prop_name.startswith("cryptomatte/")) { diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index 95ef94a6cd5..86db46e6161 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -1056,7 +1056,7 @@ BPoint *BKE_nurb_bpoint_get_prev(Nurb *nu, BPoint *bp) return bp_prev; } -void BKE_nurb_bezt_calc_normal(struct Nurb *UNUSED(nu), BezTriple *bezt, float r_normal[3]) +void BKE_nurb_bezt_calc_normal(struct Nurb * /*nu*/, BezTriple *bezt, float r_normal[3]) { /* calculate the axis matrix from the spline */ float dir_prev[3], dir_next[3]; diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc index d801484de62..01be22a57b0 100644 --- a/source/blender/blenkernel/intern/curves.cc +++ b/source/blender/blenkernel/intern/curves.cc @@ -63,7 +63,7 @@ static void curves_init_data(ID *id) new (&curves->geometry) blender::bke::CurvesGeometry(); } -static void curves_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag) +static void curves_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int flag) { using namespace blender; @@ -263,7 +263,7 @@ BoundBox *BKE_curves_boundbox_get(Object *ob) return ob->runtime.bb; } -bool BKE_curves_attribute_required(const Curves *UNUSED(curves), const char *name) +bool BKE_curves_attribute_required(const Curves * /*curves*/, const char *name) { return STREQ(name, ATTR_POSITION); } diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 32a6bc6ecb9..be99a8ee87b 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -232,7 +232,7 @@ static void layerFree_mdeformvert(void *data, const int count, const int size) static void layerInterp_mdeformvert(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, const int count, void *dest) { @@ -331,7 +331,7 @@ static void layerConstruct_mdeformvert(void *data, const int count) static void layerInterp_normal(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, const int count, void *dest) { @@ -472,7 +472,7 @@ static void layerCopy_propFloat(const void *source, void *dest, const int count) static void layerInterp_propFloat(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, const int count, void *dest) { @@ -510,7 +510,7 @@ static bool layerValidate_propFloat(void *data, const uint totitems, const bool static void layerInterp_propInt(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, const int count, void *dest) { @@ -659,7 +659,7 @@ static void layerCopy_mdisps(const void *source, void *dest, const int count) } } -static void layerFree_mdisps(void *data, const int count, const int UNUSED(size)) +static void layerFree_mdisps(void *data, const int count, const int /*size*/) { MDisps *d = static_cast<MDisps *>(data); @@ -714,7 +714,7 @@ static bool layerWrite_mdisps(CDataFile *cdf, const void *data, const int count) return true; } -static size_t layerFilesize_mdisps(CDataFile *UNUSED(cdf), const void *data, const int count) +static size_t layerFilesize_mdisps(CDataFile * /*cdf*/, const void *data, const int count) { const MDisps *d = static_cast<const MDisps *>(data); size_t size = 0; @@ -733,7 +733,7 @@ static size_t layerFilesize_mdisps(CDataFile *UNUSED(cdf), const void *data, con * \{ */ /* copy just zeros in this case */ -static void layerCopy_bmesh_elem_py_ptr(const void *UNUSED(source), void *dest, const int count) +static void layerCopy_bmesh_elem_py_ptr(const void * /*source*/, void *dest, const int count) { const int size = sizeof(void *); @@ -744,7 +744,7 @@ static void layerCopy_bmesh_elem_py_ptr(const void *UNUSED(source), void *dest, } #ifndef WITH_PYTHON -void bpy_bm_generic_invalidate(struct BPy_BMGeneric *UNUSED(self)) +void bpy_bm_generic_invalidate(struct BPy_BMGeneric * /*self*/) { /* dummy */ } @@ -768,7 +768,7 @@ static void layerFree_bmesh_elem_py_ptr(void *data, const int count, const int s static void layerInterp_paint_mask(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -804,7 +804,7 @@ static void layerCopy_grid_paint_mask(const void *source, void *dest, const int } } -static void layerFree_grid_paint_mask(void *data, const int count, const int UNUSED(size)) +static void layerFree_grid_paint_mask(void *data, const int count, const int /*size*/) { GridPaintMask *gpm = static_cast<GridPaintMask *>(data); @@ -977,7 +977,7 @@ static void layerDefault_mloopcol(void *data, const int count) static void layerInterp_mloopcol(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1075,7 +1075,7 @@ static void layerAdd_mloopuv(void *data1, const void *data2) static void layerInterp_mloopuv(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1118,8 +1118,8 @@ static bool layerValidate_mloopuv(void *data, const uint totitems, const bool do /* origspace is almost exact copy of mloopuv's, keep in sync */ static void layerCopyValue_mloop_origspace(const void *source, void *dest, - const int UNUSED(mixmode), - const float UNUSED(mixfactor)) + const int /*mixmode*/, + const float /*mixfactor*/) { const OrigSpaceLoop *luv1 = static_cast<const OrigSpaceLoop *>(source); OrigSpaceLoop *luv2 = static_cast<OrigSpaceLoop *>(dest); @@ -1169,7 +1169,7 @@ static void layerAdd_mloop_origspace(void *data1, const void *data2) static void layerInterp_mloop_origspace(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1267,7 +1267,7 @@ static void layerDefault_origindex(void *data, const int count) static void layerInterp_bweight(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1290,7 +1290,7 @@ static void layerInterp_bweight(const void **sources, static void layerInterp_shapekey(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1335,7 +1335,7 @@ static void layerCopy_mvert_skin(const void *source, void *dest, const int count static void layerInterp_mvert_skin(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1498,7 +1498,7 @@ static void layerDefault_propcol(void *data, const int count) static void layerInterp_propcol(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1520,7 +1520,7 @@ static void layerInterp_propcol(const void **sources, static void layerInterp_propfloat3(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1573,7 +1573,7 @@ static bool layerValidate_propfloat3(void *data, const uint totitems, const bool static void layerInterp_propfloat2(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -1624,7 +1624,7 @@ static bool layerValidate_propfloat2(void *data, const uint totitems, const bool static void layerInterp_propbool(const void **sources, const float *weights, - const float *UNUSED(sub_weights), + const float * /*sub_weights*/, int count, void *dest) { @@ -3163,7 +3163,7 @@ void *CustomData_duplicate_referenced_layer_named(CustomData *data, } void *CustomData_duplicate_referenced_layer_anonymous(CustomData *data, - const int UNUSED(type), + const int /*type*/, const AnonymousAttributeID *anonymous_id, const int totelem) { @@ -4594,10 +4594,7 @@ static void customdata_external_filename(char filepath[FILE_MAX], BLI_path_abs(filepath, ID_BLEND_PATH_FROM_GLOBAL(id)); } -void CustomData_external_reload(CustomData *data, - ID *UNUSED(id), - eCustomDataMask mask, - int totelem) +void CustomData_external_reload(CustomData *data, ID * /*id*/, eCustomDataMask mask, int totelem) { for (int i = 0; i < data->totlayer; i++) { CustomDataLayer *layer = &data->layers[i]; @@ -4791,11 +4788,8 @@ void CustomData_external_write( cdf_free(cdf); } -void CustomData_external_add(CustomData *data, - ID *UNUSED(id), - const int type, - const int UNUSED(totelem), - const char *filepath) +void CustomData_external_add( + CustomData *data, ID * /*id*/, const int type, const int /*totelem*/, const char *filepath) { CustomDataExternal *external = data->external; diff --git a/source/blender/blenkernel/intern/editmesh.cc b/source/blender/blenkernel/intern/editmesh.cc index 34218abf200..fb4cfad0fb9 100644 --- a/source/blender/blenkernel/intern/editmesh.cc +++ b/source/blender/blenkernel/intern/editmesh.cc @@ -290,7 +290,7 @@ void BKE_editmesh_ensure_autosmooth(BMEditMesh *em, Mesh *me) } } -BoundBox *BKE_editmesh_cage_boundbox_get(Object *object, BMEditMesh *UNUSED(em)) +BoundBox *BKE_editmesh_cage_boundbox_get(Object *object, BMEditMesh * /*em*/) { if (object->runtime.editmesh_bb_cage == nullptr) { float min[3], max[3]; diff --git a/source/blender/blenkernel/intern/editmesh_tangent.cc b/source/blender/blenkernel/intern/editmesh_tangent.cc index 6ce9d3c7bb5..016cf6acbcc 100644 --- a/source/blender/blenkernel/intern/editmesh_tangent.cc +++ b/source/blender/blenkernel/intern/editmesh_tangent.cc @@ -147,7 +147,7 @@ struct SGLSLEditMeshToTangent { #endif }; -static void emDM_calc_loop_tangents_thread(TaskPool *__restrict UNUSED(pool), void *taskdata) +static void emDM_calc_loop_tangents_thread(TaskPool *__restrict /*pool*/, void *taskdata) { SGLSLEditMeshToTangent *mesh_data = static_cast<SGLSLEditMeshToTangent *>(taskdata); diff --git a/source/blender/blenkernel/intern/geometry_component_curves.cc b/source/blender/blenkernel/intern/geometry_component_curves.cc index 4ace68546ac..d6987d76028 100644 --- a/source/blender/blenkernel/intern/geometry_component_curves.cc +++ b/source/blender/blenkernel/intern/geometry_component_curves.cc @@ -266,7 +266,7 @@ CurveLengthFieldInput::CurveLengthFieldInput() GVArray CurveLengthFieldInput::get_varray_for_context(const CurvesGeometry &curves, const eAttrDomain domain, - IndexMask UNUSED(mask)) const + const IndexMask /*mask*/) const { return construct_curve_length_gvarray(curves, domain); } @@ -617,7 +617,7 @@ static AttributeAccessorFunctions get_curves_accessor_functions() return 0; } }; - fn.domain_supported = [](const void *UNUSED(owner), const eAttrDomain domain) { + fn.domain_supported = [](const void * /*owner*/, const eAttrDomain domain) { return ELEM(domain, ATTR_DOMAIN_POINT, ATTR_DOMAIN_CURVE); }; fn.adapt_domain = [](const void *owner, diff --git a/source/blender/blenkernel/intern/geometry_component_instances.cc b/source/blender/blenkernel/intern/geometry_component_instances.cc index 3a065c3576b..0b5f7cbf902 100644 --- a/source/blender/blenkernel/intern/geometry_component_instances.cc +++ b/source/blender/blenkernel/intern/geometry_component_instances.cc @@ -413,17 +413,17 @@ class InstancePositionAttributeProvider final : public BuiltinAttributeProvider domain_}; } - bool try_delete(void *UNUSED(owner)) const final + bool try_delete(void * /*owner*/) const final { return false; } - bool try_create(void *UNUSED(owner), const AttributeInit &UNUSED(initializer)) const final + bool try_create(void * /*owner*/, const AttributeInit & /*initializer*/) const final { return false; } - bool exists(const void *UNUSED(owner)) const final + bool exists(const void * /*owner*/) const final { return true; } @@ -487,10 +487,10 @@ static AttributeAccessorFunctions get_instances_accessor_functions() return 0; } }; - fn.domain_supported = [](const void *UNUSED(owner), const eAttrDomain domain) { + fn.domain_supported = [](const void * /*owner*/, const eAttrDomain domain) { return domain == ATTR_DOMAIN_INSTANCE; }; - fn.adapt_domain = [](const void *UNUSED(owner), + fn.adapt_domain = [](const void * /*owner*/, const blender::GVArray &varray, const eAttrDomain from_domain, const eAttrDomain to_domain) { diff --git a/source/blender/blenkernel/intern/geometry_component_mesh.cc b/source/blender/blenkernel/intern/geometry_component_mesh.cc index bf1dc1453c2..5a1333e1d75 100644 --- a/source/blender/blenkernel/intern/geometry_component_mesh.cc +++ b/source/blender/blenkernel/intern/geometry_component_mesh.cc @@ -1132,17 +1132,17 @@ class NormalAttributeProvider final : public BuiltinAttributeProvider { return VArray<float3>::ForSpan({(float3 *)BKE_mesh_poly_normals_ensure(mesh), mesh->totpoly}); } - GAttributeWriter try_get_for_write(void *UNUSED(owner)) const final + GAttributeWriter try_get_for_write(void * /*owner*/) const final { return {}; } - bool try_delete(void *UNUSED(owner)) const final + bool try_delete(void * /*owner*/) const final { return false; } - bool try_create(void *UNUSED(owner), const AttributeInit &UNUSED(initializer)) const final + bool try_create(void * /*owner*/, const AttributeInit & /*initializer*/) const final { return false; } @@ -1312,7 +1312,7 @@ static AttributeAccessorFunctions get_mesh_accessor_functions() return 0; } }; - fn.domain_supported = [](const void *UNUSED(owner), const eAttrDomain domain) { + fn.domain_supported = [](const void * /*owner*/, const eAttrDomain domain) { return ELEM(domain, ATTR_DOMAIN_POINT, ATTR_DOMAIN_EDGE, ATTR_DOMAIN_FACE, ATTR_DOMAIN_CORNER); }; fn.adapt_domain = [](const void *owner, diff --git a/source/blender/blenkernel/intern/geometry_component_pointcloud.cc b/source/blender/blenkernel/intern/geometry_component_pointcloud.cc index 6980b561bc3..34cc99d2f92 100644 --- a/source/blender/blenkernel/intern/geometry_component_pointcloud.cc +++ b/source/blender/blenkernel/intern/geometry_component_pointcloud.cc @@ -180,10 +180,10 @@ static AttributeAccessorFunctions get_pointcloud_accessor_functions() return 0; } }; - fn.domain_supported = [](const void *UNUSED(owner), const eAttrDomain domain) { + fn.domain_supported = [](const void * /*owner*/, const eAttrDomain domain) { return domain == ATTR_DOMAIN_POINT; }; - fn.adapt_domain = [](const void *UNUSED(owner), + fn.adapt_domain = [](const void * /*owner*/, const blender::GVArray &varray, const eAttrDomain from_domain, const eAttrDomain to_domain) { diff --git a/source/blender/blenkernel/intern/geometry_fields.cc b/source/blender/blenkernel/intern/geometry_fields.cc index e242154cb5b..00913905c1c 100644 --- a/source/blender/blenkernel/intern/geometry_fields.cc +++ b/source/blender/blenkernel/intern/geometry_fields.cc @@ -242,7 +242,7 @@ GVArray InstancesFieldInput::get_varray_for_context(const fn::FieldContext &cont } GVArray AttributeFieldInput::get_varray_for_context(const GeometryFieldContext &context, - IndexMask UNUSED(mask)) const + const IndexMask /*mask*/) const { const eCustomDataType data_type = cpp_type_to_custom_data_type(*type_); if (auto attributes = context.attributes()) { diff --git a/source/blender/blenkernel/intern/idprop_serialize.cc b/source/blender/blenkernel/intern/idprop_serialize.cc index 9e5733e5a2b..8381b0a1755 100644 --- a/source/blender/blenkernel/intern/idprop_serialize.cc +++ b/source/blender/blenkernel/intern/idprop_serialize.cc @@ -665,7 +665,7 @@ class IDPUnknownSerializer : public IDPropertySerializer { } std::shared_ptr<DictionaryValue> idprop_to_dictionary( - const struct IDProperty *UNUSED(id_property)) const override + const struct IDProperty * /*id_property*/) const override { BLI_assert_unreachable(); return nullptr; @@ -677,7 +677,7 @@ class IDPUnknownSerializer : public IDPropertySerializer { } std::unique_ptr<IDProperty, IDPropertyDeleter> entry_to_idprop( - DictionaryEntryParser &UNUSED(entry_reader)) const override + DictionaryEntryParser & /*entry_reader*/) const override { return nullptr; } diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index f6e19277993..409eb0067b5 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -153,7 +153,7 @@ static void image_init_data(ID *id) } } -static void image_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag) +static void image_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int flag) { Image *image_dst = (Image *)id_dst; const Image *image_src = (const Image *)id_src; @@ -410,7 +410,7 @@ static void image_blend_read_data(BlendDataReader *reader, ID *id) image_runtime_reset(ima); } -static void image_blend_read_lib(BlendLibReader *UNUSED(reader), ID *id) +static void image_blend_read_lib(BlendLibReader * /*reader*/, ID *id) { Image *ima = (Image *)id; /* Images have some kind of 'main' cache, when null we should also clear all others. */ @@ -1546,7 +1546,7 @@ void BKE_image_print_memlist(Main *bmain) } } -static bool imagecache_check_dirty(ImBuf *ibuf, void *UNUSED(userkey), void *UNUSED(userdata)) +static bool imagecache_check_dirty(ImBuf *ibuf, void * /*userkey*/, void * /*userdata*/) { if (ibuf == nullptr) { return false; @@ -1595,7 +1595,7 @@ void BKE_image_free_all_textures(Main *bmain) #endif } -static bool imagecache_check_free_anim(ImBuf *ibuf, void *UNUSED(userkey), void *userdata) +static bool imagecache_check_free_anim(ImBuf *ibuf, void * /*userkey*/, void *userdata) { if (ibuf == nullptr) { return true; @@ -2470,7 +2470,7 @@ void BKE_stamp_data_free(StampData *stamp_data) } /* wrap for callback only */ -static void metadata_set_field(void *data, const char *propname, char *propvalue, int UNUSED(len)) +static void metadata_set_field(void *data, const char *propname, char *propvalue, int /*len*/) { /* We know it is an ImBuf* because that's what we pass to BKE_stamp_info_callback. */ ImBuf *imbuf = static_cast<ImBuf *>(data); @@ -3876,7 +3876,7 @@ static void image_create_multilayer(Image *ima, ImBuf *ibuf, int framenr) #endif /* WITH_OPENEXR */ /** Common stuff to do with images after loading. */ -static void image_init_after_load(Image *ima, ImageUser *iuser, ImBuf *UNUSED(ibuf)) +static void image_init_after_load(Image *ima, ImageUser *iuser, ImBuf * /*ibuf*/) { /* Preview is null when it has never been used as an icon before. * Never handle previews/icons outside of main thread. */ @@ -5024,7 +5024,7 @@ void BKE_image_user_frame_calc(Image *ima, ImageUser *iuser, int cfra) /* goes over all ImageUsers, and sets frame numbers if auto-refresh is set */ static void image_editors_update_frame(Image *ima, - ID *UNUSED(iuser_id), + ID * /*iuser_id*/, ImageUser *iuser, void *customdata) { @@ -5046,8 +5046,8 @@ void BKE_image_editors_update_frame(const Main *bmain, int cfra) } static void image_user_id_has_animation(Image *ima, - ID *UNUSED(iuser_id), - ImageUser *UNUSED(iuser), + ID * /*iuser_id*/, + ImageUser * /*iuser*/, void *customdata) { if (ima && BKE_image_is_animated(ima)) { @@ -5066,7 +5066,7 @@ bool BKE_image_user_id_has_animation(ID *id) } static void image_user_id_eval_animation(Image *ima, - ID *UNUSED(iduser_id), + ID * /*iduser_id*/, ImageUser *iuser, void *customdata) { @@ -5330,7 +5330,7 @@ bool BKE_image_is_dirty(Image *image) return BKE_image_is_dirty_writable(image, nullptr); } -void BKE_image_mark_dirty(Image *UNUSED(image), ImBuf *ibuf) +void BKE_image_mark_dirty(Image * /*image*/, ImBuf *ibuf) { ibuf->userflags |= IB_BITMAPDIRTY; } diff --git a/source/blender/blenkernel/intern/lib_id_remapper.cc b/source/blender/blenkernel/intern/lib_id_remapper.cc index 98ac9110a48..cedbab5aa18 100644 --- a/source/blender/blenkernel/intern/lib_id_remapper.cc +++ b/source/blender/blenkernel/intern/lib_id_remapper.cc @@ -221,7 +221,7 @@ const char *BKE_id_remapper_result_string(const IDRemapperApplyResult result) return ""; } -static void id_remapper_print_item_cb(ID *old_id, ID *new_id, void *UNUSED(user_data)) +static void id_remapper_print_item_cb(ID *old_id, ID *new_id, void * /*user_data*/) { if (old_id != nullptr && new_id != nullptr) { printf("Remap %s(%p) to %s(%p)\n", old_id->name, old_id, new_id->name, new_id); diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index 7202570f732..db8d88854df 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -3131,7 +3131,7 @@ bool BKE_lib_override_library_property_operation_operands_validate( return true; } -void BKE_lib_override_library_validate(Main *UNUSED(bmain), ID *id, ReportList *reports) +void BKE_lib_override_library_validate(Main * /*bmain*/, ID *id, ReportList *reports) { if (id->override_library == nullptr) { return; @@ -3938,8 +3938,8 @@ ID *BKE_lib_override_library_operations_store_start(Main *bmain, return storage_id; } -void BKE_lib_override_library_operations_store_end( - OverrideLibraryStorage *UNUSED(override_storage), ID *local) +void BKE_lib_override_library_operations_store_end(OverrideLibraryStorage * /*override_storage*/, + ID *local) { BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(local)); diff --git a/source/blender/blenkernel/intern/mball.cc b/source/blender/blenkernel/intern/mball.cc index 7c83bed85b0..d9b08d4fe2d 100644 --- a/source/blender/blenkernel/intern/mball.cc +++ b/source/blender/blenkernel/intern/mball.cc @@ -65,10 +65,7 @@ static void metaball_init_data(ID *id) MEMCPY_STRUCT_AFTER(metaball, DNA_struct_default_get(MetaBall), id); } -static void metaball_copy_data(Main *UNUSED(bmain), - ID *id_dst, - const ID *id_src, - const int UNUSED(flag)) +static void metaball_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int /*flag*/) { MetaBall *metaball_dst = (MetaBall *)id_dst; const MetaBall *metaball_src = (const MetaBall *)id_src; diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc index 4c6ecff60ad..1fd4bbd2bff 100644 --- a/source/blender/blenkernel/intern/mesh_convert.cc +++ b/source/blender/blenkernel/intern/mesh_convert.cc @@ -604,7 +604,7 @@ void BKE_mesh_to_curve_nurblist(const Mesh *me, ListBase *nurblist, const int ed } } -void BKE_mesh_to_curve(Main *bmain, Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob) +void BKE_mesh_to_curve(Main *bmain, Depsgraph *depsgraph, Scene * /*scene*/, Object *ob) { /* make new mesh data from the original copy */ Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); @@ -654,7 +654,7 @@ void BKE_pointcloud_from_mesh(Mesh *me, PointCloud *pointcloud) point_positions.finish(); } -void BKE_mesh_to_pointcloud(Main *bmain, Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob) +void BKE_mesh_to_pointcloud(Main *bmain, Depsgraph *depsgraph, Scene * /*scene*/, Object *ob) { BLI_assert(ob->type == OB_MESH); @@ -710,7 +710,7 @@ void BKE_mesh_edges_set_draw_render(Mesh *mesh) } } -void BKE_pointcloud_to_mesh(Main *bmain, Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob) +void BKE_pointcloud_to_mesh(Main *bmain, Depsgraph *depsgraph, Scene * /*scene*/, Object *ob) { BLI_assert(ob->type == OB_POINTCLOUD); diff --git a/source/blender/blenkernel/intern/mesh_evaluate.cc b/source/blender/blenkernel/intern/mesh_evaluate.cc index ae0d5efa112..9a199c9c768 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.cc +++ b/source/blender/blenkernel/intern/mesh_evaluate.cc @@ -528,7 +528,7 @@ bool BKE_mesh_center_of_volume(const Mesh *me, float r_cent[3]) * \{ */ static bool mesh_calc_center_centroid_ex(const MVert *mverts, - int UNUSED(mverts_num), + int /*mverts_num*/, const MLoopTri *looptri, int looptri_num, const MLoop *mloop, diff --git a/source/blender/blenkernel/intern/mesh_fair.cc b/source/blender/blenkernel/intern/mesh_fair.cc index df61169fa5c..501f01e3368 100644 --- a/source/blender/blenkernel/intern/mesh_fair.cc +++ b/source/blender/blenkernel/intern/mesh_fair.cc @@ -440,7 +440,7 @@ class VoronoiVertexWeight : public VertexWeight { class UniformLoopWeight : public LoopWeight { public: - float weight_at_index(const int UNUSED(index)) override + float weight_at_index(const int /*index*/) override { return 1.0f; } diff --git a/source/blender/blenkernel/intern/mesh_mapping.cc b/source/blender/blenkernel/intern/mesh_mapping.cc index c1523f0a525..05d1a478c09 100644 --- a/source/blender/blenkernel/intern/mesh_mapping.cc +++ b/source/blender/blenkernel/intern/mesh_mapping.cc @@ -262,12 +262,12 @@ void BKE_mesh_vert_loop_map_create(MeshElemMap **r_map, void BKE_mesh_vert_looptri_map_create(MeshElemMap **r_map, int **r_mem, - const MVert *UNUSED(mvert), + const MVert * /*mvert*/, const int totvert, const MLoopTri *mlooptri, const int totlooptri, const MLoop *mloop, - const int UNUSED(totloop)) + const int /*totloop*/) { MeshElemMap *map = MEM_cnew_array<MeshElemMap>(size_t(totvert), __func__); int *indices = static_cast<int *>(MEM_mallocN(sizeof(int) * size_t(totlooptri) * 3, __func__)); @@ -384,7 +384,7 @@ void BKE_mesh_vert_edge_vert_map_create( void BKE_mesh_edge_loop_map_create(MeshElemMap **r_map, int **r_mem, - const MEdge *UNUSED(medge), + const MEdge * /*medge*/, const int totedge, const MPoly *mpoly, const int totpoly, @@ -437,7 +437,7 @@ void BKE_mesh_edge_loop_map_create(MeshElemMap **r_map, void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map, int **r_mem, - const MEdge *UNUSED(medge), + const MEdge * /*medge*/, const int totedge, const MPoly *mpoly, const int totpoly, @@ -802,12 +802,12 @@ static void poly_edge_loop_islands_calc(const MEdge *medge, } static bool poly_is_island_boundary_smooth_cb(const MPoly *mp, - const MLoop *UNUSED(ml), + const MLoop * /*ml*/, const MEdge *me, const int edge_user_count, const MPoly *mpoly_array, const MeshElemMap *edge_poly_map, - void *UNUSED(user_data)) + void * /*user_data*/) { /* Edge is sharp if one of its polys is flat, or edge itself is sharp, * or edge is not used by exactly two polygons. */ @@ -977,12 +977,12 @@ struct MeshCheckIslandBoundaryUv { const MeshElemMap *edge_loop_map; }; -static bool mesh_check_island_boundary_uv(const MPoly *UNUSED(mp), +static bool mesh_check_island_boundary_uv(const MPoly * /*mp*/, const MLoop *ml, const MEdge *me, - const int UNUSED(edge_user_count), - const MPoly *UNUSED(mpoly_array), - const MeshElemMap *UNUSED(edge_poly_map), + const int /*edge_user_count*/, + const MPoly * /*mpoly_array*/, + const MeshElemMap * /*edge_poly_map*/, void *user_data) { if (user_data) { @@ -1021,8 +1021,8 @@ static bool mesh_check_island_boundary_uv(const MPoly *UNUSED(mp), return (me->flag & ME_SEAM) != 0; } -static bool mesh_calc_islands_loop_poly_uv(const MVert *UNUSED(verts), - const int UNUSED(totvert), +static bool mesh_calc_islands_loop_poly_uv(const MVert * /*verts*/, + const int /*totvert*/, const MEdge *edges, const int totedge, const MPoly *polys, diff --git a/source/blender/blenkernel/intern/mesh_normals.cc b/source/blender/blenkernel/intern/mesh_normals.cc index 55d83b64e39..e589aff1c73 100644 --- a/source/blender/blenkernel/intern/mesh_normals.cc +++ b/source/blender/blenkernel/intern/mesh_normals.cc @@ -181,7 +181,7 @@ struct MeshCalcNormalsData_Poly { static void mesh_calc_normals_poly_fn(void *__restrict userdata, const int pidx, - const TaskParallelTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict /*tls*/) { const MeshCalcNormalsData_Poly *data = (MeshCalcNormalsData_Poly *)userdata; const MPoly *mp = &data->mpoly[pidx]; @@ -189,9 +189,9 @@ static void mesh_calc_normals_poly_fn(void *__restrict userdata, } void BKE_mesh_calc_normals_poly(const MVert *mvert, - int UNUSED(mvert_len), + int /*mvert_len*/, const MLoop *mloop, - int UNUSED(mloop_len), + int /*mloop_len*/, const MPoly *mpoly, int mpoly_len, float (*r_poly_normals)[3]) @@ -231,8 +231,9 @@ struct MeshCalcNormalsData_PolyAndVertex { float (*vnors)[3]; }; -static void mesh_calc_normals_poly_and_vertex_accum_fn( - void *__restrict userdata, const int pidx, const TaskParallelTLS *__restrict UNUSED(tls)) +static void mesh_calc_normals_poly_and_vertex_accum_fn(void *__restrict userdata, + const int pidx, + const TaskParallelTLS *__restrict /*tls*/) { const MeshCalcNormalsData_PolyAndVertex *data = (MeshCalcNormalsData_PolyAndVertex *)userdata; const MPoly *mp = &data->mpoly[pidx]; @@ -294,7 +295,7 @@ static void mesh_calc_normals_poly_and_vertex_accum_fn( } static void mesh_calc_normals_poly_and_vertex_finalize_fn( - void *__restrict userdata, const int vidx, const TaskParallelTLS *__restrict UNUSED(tls)) + void *__restrict userdata, const int vidx, const TaskParallelTLS *__restrict /*tls*/) { MeshCalcNormalsData_PolyAndVertex *data = (MeshCalcNormalsData_PolyAndVertex *)userdata; @@ -310,7 +311,7 @@ static void mesh_calc_normals_poly_and_vertex_finalize_fn( void BKE_mesh_calc_normals_poly_and_vertex(const MVert *mvert, const int mvert_len, const MLoop *mloop, - const int UNUSED(mloop_len), + const int /*mloop_len*/, const MPoly *mpoly, const int mpoly_len, float (*r_poly_normals)[3], @@ -945,7 +946,7 @@ static void mesh_edges_sharp_tag(LoopSplitTaskDataCommon *data, } void BKE_edges_sharp_from_angle_set(const struct MVert *mverts, - const int UNUSED(numVerts), + const int /*numVerts*/, struct MEdge *medges, const int numEdges, const struct MLoop *mloops, @@ -1606,7 +1607,7 @@ static void loop_split_generator(TaskPool *pool, LoopSplitTaskDataCommon *common void BKE_mesh_normals_loop_split(const MVert *mverts, const float (*vert_normals)[3], - const int UNUSED(numVerts), + const int /*numVerts*/, const MEdge *medges, const int numEdges, const MLoop *mloops, diff --git a/source/blender/blenkernel/intern/mesh_runtime.cc b/source/blender/blenkernel/intern/mesh_runtime.cc index 062d6cdb952..bd9f8242274 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.cc +++ b/source/blender/blenkernel/intern/mesh_runtime.cc @@ -78,7 +78,7 @@ void BKE_mesh_runtime_free_data(Mesh *mesh) mesh_runtime_free_mutexes(mesh); } -void BKE_mesh_runtime_reset_on_copy(Mesh *mesh, const int UNUSED(flag)) +void BKE_mesh_runtime_reset_on_copy(Mesh *mesh, const int /*flag*/) { Mesh_Runtime *runtime = &mesh->runtime; diff --git a/source/blender/blenkernel/intern/mesh_tangent.cc b/source/blender/blenkernel/intern/mesh_tangent.cc index 7c12e15ca7b..07b45cf376d 100644 --- a/source/blender/blenkernel/intern/mesh_tangent.cc +++ b/source/blender/blenkernel/intern/mesh_tangent.cc @@ -77,12 +77,12 @@ struct BKEMeshToTangent { }; void BKE_mesh_calc_loop_tangent_single_ex(const MVert *mverts, - const int UNUSED(numVerts), + const int /*numVerts*/, const MLoop *mloops, float (*r_looptangent)[4], const float (*loopnors)[3], const MLoopUV *loopuvs, - const int UNUSED(numLoops), + const int /*numLoops*/, const MPoly *mpolys, const int numPolys, ReportList *reports) @@ -298,7 +298,7 @@ struct SGLSLMeshToTangent { #endif }; -static void DM_calc_loop_tangents_thread(TaskPool *__restrict UNUSED(pool), void *taskdata) +static void DM_calc_loop_tangents_thread(TaskPool *__restrict /*pool*/, void *taskdata) { SGLSLMeshToTangent *mesh_data = static_cast<SGLSLMeshToTangent *>(taskdata); diff --git a/source/blender/blenkernel/intern/mesh_tessellate.cc b/source/blender/blenkernel/intern/mesh_tessellate.cc index 88f78197566..df83743634c 100644 --- a/source/blender/blenkernel/intern/mesh_tessellate.cc +++ b/source/blender/blenkernel/intern/mesh_tessellate.cc @@ -263,7 +263,7 @@ static void mesh_calc_tessellation_for_face_with_normal_fn(void *__restrict user data->poly_normals[index]); } -static void mesh_calc_tessellation_for_face_free_fn(const void *__restrict UNUSED(userdata), +static void mesh_calc_tessellation_for_face_free_fn(const void *__restrict /*userdata*/, void *__restrict tls_v) { TessellationUserTLS *tls_data = static_cast<TessellationUserTLS *>(tls_v); @@ -275,7 +275,7 @@ static void mesh_calc_tessellation_for_face_free_fn(const void *__restrict UNUSE static void mesh_recalc_looptri__multi_threaded(const MLoop *mloop, const MPoly *mpoly, const MVert *mvert, - int UNUSED(totloop), + int /*totloop*/, int totpoly, MLoopTri *mlooptri, const float (*poly_normals)[3]) diff --git a/source/blender/blenkernel/intern/mesh_validate.cc b/source/blender/blenkernel/intern/mesh_validate.cc index 95f885c45dd..9b140171912 100644 --- a/source/blender/blenkernel/intern/mesh_validate.cc +++ b/source/blender/blenkernel/intern/mesh_validate.cc @@ -1361,13 +1361,13 @@ static int vergedgesort(const void *v1, const void *v2) /* Create edges based on known verts and faces, * this function is only used when loading very old blend files */ -static void mesh_calc_edges_mdata(const MVert *UNUSED(allvert), +static void mesh_calc_edges_mdata(const MVert * /*allvert*/, const MFace *allface, MLoop *allloop, const MPoly *allpoly, - int UNUSED(totvert), + int /*totvert*/, int totface, - int UNUSED(totloop), + int /*totloop*/, int totpoly, const bool use_old, MEdge **r_medge, diff --git a/source/blender/blenkernel/intern/modifier.cc b/source/blender/blenkernel/intern/modifier.cc index 19c5499d058..2f8a02fa516 100644 --- a/source/blender/blenkernel/intern/modifier.cc +++ b/source/blender/blenkernel/intern/modifier.cc @@ -165,8 +165,8 @@ ModifierData *BKE_modifier_new(int type) return md; } -static void modifier_free_data_id_us_cb(void *UNUSED(userData), - Object *UNUSED(ob), +static void modifier_free_data_id_us_cb(void * /*userData*/, + Object * /*ob*/, ID **idpoin, int cb_flag) { @@ -336,7 +336,7 @@ ModifierData *BKE_modifier_copy_ex(const ModifierData *md, int flag) void BKE_modifier_copydata_generic(const ModifierData *md_src, ModifierData *md_dst, - const int UNUSED(flag)) + const int /*flag*/) { const ModifierTypeInfo *mti = BKE_modifier_get_info(ModifierType(md_src->type)); @@ -356,8 +356,8 @@ void BKE_modifier_copydata_generic(const ModifierData *md_src, md_dst->runtime = nullptr; } -static void modifier_copy_data_id_us_cb(void *UNUSED(userData), - Object *UNUSED(ob), +static void modifier_copy_data_id_us_cb(void * /*userData*/, + Object * /*ob*/, ID **idpoin, int cb_flag) { diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 959093b73b8..039bb1bf7f3 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -118,7 +118,7 @@ static void ntree_set_typeinfo(bNodeTree *ntree, bNodeTreeType *typeinfo); static void node_socket_copy(bNodeSocket *sock_dst, const bNodeSocket *sock_src, const int flag); static void free_localized_node_groups(bNodeTree *ntree); static void node_free_node(bNodeTree *ntree, bNode *node); -static void node_socket_interface_free(bNodeTree *UNUSED(ntree), +static void node_socket_interface_free(bNodeTree * /*ntree*/, bNodeSocket *sock, const bool do_id_user); @@ -129,7 +129,7 @@ static void ntree_init_data(ID *id) ntree_set_typeinfo(ntree, nullptr); } -static void ntree_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag) +static void ntree_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int flag) { bNodeTree *ntree_dst = (bNodeTree *)id_dst; const bNodeTree *ntree_src = (const bNodeTree *)id_src; @@ -1533,7 +1533,7 @@ static bool unique_identifier_check(void *arg, const char *identifier) } static bNodeSocket *make_socket(bNodeTree *ntree, - bNode *UNUSED(node), + bNode * /*node*/, int in_out, ListBase *lb, const char *idname, @@ -1676,7 +1676,7 @@ static bool socket_id_user_decrement(bNodeSocket *sock) } void nodeModifySocketType(bNodeTree *ntree, - bNode *UNUSED(node), + bNode * /*node*/, bNodeSocket *sock, const char *idname) { @@ -1895,7 +1895,7 @@ const char *nodeStaticSocketInterfaceType(int type, int subtype) return nullptr; } -const char *nodeStaticSocketLabel(int type, int UNUSED(subtype)) +const char *nodeStaticSocketLabel(int type, int /*subtype*/) { switch (type) { case SOCK_FLOAT: @@ -2652,7 +2652,7 @@ bNodeTree *ntreeAddTree(Main *bmain, const char *name, const char *idname) return ntreeAddTree_do(bmain, nullptr, false, name, idname); } -bNodeTree *ntreeAddTreeEmbedded(Main *UNUSED(bmain), +bNodeTree *ntreeAddTreeEmbedded(Main * /*bmain*/, ID *owner_id, const char *name, const char *idname) @@ -3034,7 +3034,7 @@ void nodeRemoveNode(Main *bmain, bNodeTree *ntree, bNode *node, bool do_id_user) node_free_node(ntree, node); } -static void node_socket_interface_free(bNodeTree *UNUSED(ntree), +static void node_socket_interface_free(bNodeTree * /*ntree*/, bNodeSocket *sock, const bool do_id_user) { @@ -3405,7 +3405,7 @@ static void ntree_interface_identifier_base(bNodeTree *ntree, char *base) } /* check if the identifier is already in use */ -static bool ntree_interface_unique_identifier_check(void *UNUSED(data), const char *identifier) +static bool ntree_interface_unique_identifier_check(void * /*data*/, const char *identifier) { return (RNA_struct_find(identifier) != nullptr); } @@ -3679,7 +3679,7 @@ void nodeSocketDeclarationsUpdate(bNode *node) update_socket_declarations(&node->outputs, node->runtime->declaration->outputs()); } -bool nodeDeclarationEnsureOnOutdatedNode(bNodeTree *UNUSED(ntree), bNode *node) +bool nodeDeclarationEnsureOnOutdatedNode(bNodeTree * /*ntree*/, bNode *node) { if (node->runtime->declaration != nullptr) { return false; @@ -3978,7 +3978,7 @@ void BKE_node_instance_hash_clear_tags(bNodeInstanceHash *hash) } } -void BKE_node_instance_hash_tag(bNodeInstanceHash *UNUSED(hash), void *value) +void BKE_node_instance_hash_tag(bNodeInstanceHash * /*hash*/, void *value) { bNodeInstanceHashEntry *entry = (bNodeInstanceHashEntry *)value; entry->tag = 1; @@ -4184,9 +4184,9 @@ static void node_type_base_defaults(bNodeType *ntype) } /* allow this node for any tree type */ -static bool node_poll_default(bNodeType *UNUSED(ntype), - bNodeTree *UNUSED(ntree), - const char **UNUSED(disabled_hint)) +static bool node_poll_default(bNodeType * /*ntype*/, + bNodeTree * /*ntree*/, + const char ** /*disabled_hint*/) { return true; } @@ -4392,9 +4392,9 @@ void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn) /* callbacks for undefined types */ -static bool node_undefined_poll(bNodeType *UNUSED(ntype), - bNodeTree *UNUSED(nodetree), - const char **UNUSED(r_disabled_hint)) +static bool node_undefined_poll(bNodeType * /*ntype*/, + bNodeTree * /*nodetree*/, + const char ** /*r_disabled_hint*/) { /* this type can not be added deliberately, it's just a placeholder */ return false; diff --git a/source/blender/blenkernel/intern/node_tree_update.cc b/source/blender/blenkernel/intern/node_tree_update.cc index 591e710dea2..707bb83a3bc 100644 --- a/source/blender/blenkernel/intern/node_tree_update.cc +++ b/source/blender/blenkernel/intern/node_tree_update.cc @@ -1679,12 +1679,12 @@ void BKE_ntree_update_tag_link_removed(bNodeTree *ntree) add_tree_tag(ntree, NTREE_CHANGED_LINK); } -void BKE_ntree_update_tag_link_added(bNodeTree *ntree, bNodeLink *UNUSED(link)) +void BKE_ntree_update_tag_link_added(bNodeTree *ntree, bNodeLink * /*link*/) { add_tree_tag(ntree, NTREE_CHANGED_LINK); } -void BKE_ntree_update_tag_link_mute(bNodeTree *ntree, bNodeLink *UNUSED(link)) +void BKE_ntree_update_tag_link_mute(bNodeTree *ntree, bNodeLink * /*link*/) { add_tree_tag(ntree, NTREE_CHANGED_LINK); } @@ -1717,7 +1717,7 @@ void BKE_ntree_update_tag_id_changed(Main *bmain, ID *id) FOREACH_NODETREE_END; } -void BKE_ntree_update_tag_image_user_changed(bNodeTree *ntree, ImageUser *UNUSED(iuser)) +void BKE_ntree_update_tag_image_user_changed(bNodeTree *ntree, ImageUser * /*iuser*/) { /* Would have to search for the node that uses the image user for a more detailed tag. */ add_tree_tag(ntree, NTREE_CHANGED_ANY); diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index 20ba47efaa0..75da9f92f49 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -321,7 +321,7 @@ static void object_free_data(ID *id) } static void library_foreach_modifiersForeachIDLink(void *user_data, - Object *UNUSED(object), + Object * /*object*/, ID **id_pointer, int cb_flag) { @@ -331,7 +331,7 @@ static void library_foreach_modifiersForeachIDLink(void *user_data, } static void library_foreach_gpencil_modifiersForeachIDLink(void *user_data, - Object *UNUSED(object), + Object * /*object*/, ID **id_pointer, int cb_flag) { @@ -341,7 +341,7 @@ static void library_foreach_gpencil_modifiersForeachIDLink(void *user_data, } static void library_foreach_shaderfxForeachIDLink(void *user_data, - Object *UNUSED(object), + Object * /*object*/, ID **id_pointer, int cb_flag) { @@ -350,7 +350,7 @@ static void library_foreach_shaderfxForeachIDLink(void *user_data, data, BKE_lib_query_foreachid_process(data, id_pointer, cb_flag)); } -static void library_foreach_constraintObjectLooper(bConstraint *UNUSED(con), +static void library_foreach_constraintObjectLooper(bConstraint * /*con*/, ID **id_pointer, bool is_reference, void *user_data) @@ -361,7 +361,7 @@ static void library_foreach_constraintObjectLooper(bConstraint *UNUSED(con), data, BKE_lib_query_foreachid_process(data, id_pointer, cb_flag)); } -static void library_foreach_particlesystemsObjectLooper(ParticleSystem *UNUSED(psys), +static void library_foreach_particlesystemsObjectLooper(ParticleSystem * /*psys*/, ID **id_pointer, void *user_data, int cb_flag) @@ -1017,9 +1017,9 @@ static void expand_constraint_channels(BlendExpander *expander, ListBase *chanba } static void expand_object_expandModifiers(void *userData, - Object *UNUSED(ob), + Object * /*ob*/, ID **idpoin, - int UNUSED(cb_flag)) + int /*cb_flag*/) { BlendExpander *expander = (BlendExpander *)userData; BLO_expand(expander, *idpoin); @@ -4126,8 +4126,8 @@ struct GPencilStrokePointIterData { void *user_data; }; -static void foreach_display_point_gpencil_stroke_fn(bGPDlayer *UNUSED(layer), - bGPDframe *UNUSED(frame), +static void foreach_display_point_gpencil_stroke_fn(bGPDlayer * /*layer*/, + bGPDframe * /*frame*/, bGPDstroke *stroke, void *thunk) { @@ -5098,7 +5098,7 @@ void BKE_object_runtime_reset(Object *object) memset(&object->runtime, 0, sizeof(object->runtime)); } -void BKE_object_runtime_reset_on_copy(Object *object, const int UNUSED(flag)) +void BKE_object_runtime_reset_on_copy(Object *object, const int /*flag*/) { Object_Runtime *runtime = &object->runtime; runtime->data_eval = nullptr; diff --git a/source/blender/blenkernel/intern/object_update.cc b/source/blender/blenkernel/intern/object_update.cc index 19e15a169b9..5328d956cee 100644 --- a/source/blender/blenkernel/intern/object_update.cc +++ b/source/blender/blenkernel/intern/object_update.cc @@ -278,7 +278,7 @@ void BKE_object_sync_to_original(Depsgraph *depsgraph, Object *object) object_sync_boundbox_to_original(object_orig, object); } -void BKE_object_eval_uber_transform(Depsgraph *UNUSED(depsgraph), Object *UNUSED(object)) +void BKE_object_eval_uber_transform(Depsgraph * /*depsgraph*/, Object * /*object*/) { } diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index de4b6caa781..ea4360b1626 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -89,10 +89,7 @@ static void palette_init_data(ID *id) id_fake_user_set(&palette->id); } -static void palette_copy_data(Main *UNUSED(bmain), - ID *id_dst, - const ID *id_src, - const int UNUSED(flag)) +static void palette_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int /*flag*/) { Palette *palette_dst = (Palette *)id_dst; const Palette *palette_src = (const Palette *)id_src; @@ -123,7 +120,7 @@ static void palette_blend_read_data(BlendDataReader *reader, ID *id) BLO_read_list(reader, &palette->colors); } -static void palette_undo_preserve(BlendLibReader *UNUSED(reader), ID *id_new, ID *id_old) +static void palette_undo_preserve(BlendLibReader * /*reader*/, ID *id_new, ID *id_old) { /* Whole Palette is preserved across undo-steps, and it has no extra pointer, simple. */ /* NOTE: We do not care about potential internal references to self here, Palette has none. */ @@ -163,10 +160,10 @@ IDTypeInfo IDType_ID_PAL = { /* lib_override_apply_post */ nullptr, }; -static void paint_curve_copy_data(Main *UNUSED(bmain), +static void paint_curve_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, - const int UNUSED(flag)) + const int /*flag*/) { PaintCurve *paint_curve_dst = (PaintCurve *)id_dst; const PaintCurve *paint_curve_src = (const PaintCurve *)id_src; @@ -2306,7 +2303,7 @@ void BKE_sculpt_bvh_update_from_ccg(PBVH *pbvh, SubdivCCG *subdiv_ccg) subdiv_ccg->grid_hidden); } -bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const View3D *UNUSED(v3d)) +bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const View3D * /*v3d*/) { SculptSession *ss = ob->sculpt; if (ss == nullptr || ss->pbvh == nullptr || ss->mode_type != OB_MODE_SCULPT) { diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc b/source/blender/blenkernel/intern/pbvh_pixels.cc index f733f3145ec..df616d4e087 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels.cc @@ -114,7 +114,7 @@ struct EncodePixelsUserData { static void do_encode_pixels(void *__restrict userdata, const int n, - const TaskParallelTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict /*tls*/) { EncodePixelsUserData *data = static_cast<EncodePixelsUserData *>(userdata); Image *image = data->image; diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc index 5c935bf6daf..c73bbb91965 100644 --- a/source/blender/blenkernel/intern/pointcloud.cc +++ b/source/blender/blenkernel/intern/pointcloud.cc @@ -70,7 +70,7 @@ static void pointcloud_init_data(ID *id) POINTCLOUD_ATTR_POSITION); } -static void pointcloud_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag) +static void pointcloud_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int flag) { PointCloud *pointcloud_dst = (PointCloud *)id_dst; const PointCloud *pointcloud_src = (const PointCloud *)id_src; @@ -339,7 +339,7 @@ BoundBox *BKE_pointcloud_boundbox_get(Object *ob) return ob->runtime.bb; } -bool BKE_pointcloud_attribute_required(const PointCloud *UNUSED(pointcloud), const char *name) +bool BKE_pointcloud_attribute_required(const PointCloud * /*pointcloud*/, const char *name) { return STREQ(name, POINTCLOUD_ATTR_POSITION); } diff --git a/source/blender/blenkernel/intern/scene.cc b/source/blender/blenkernel/intern/scene.cc index 2489c64ba0a..d6183210186 100644 --- a/source/blender/blenkernel/intern/scene.cc +++ b/source/blender/blenkernel/intern/scene.cc @@ -457,7 +457,7 @@ static void scene_free_data(ID *id) BLI_assert(scene->layer_properties == nullptr); } -static void scene_foreach_rigidbodyworldSceneLooper(struct RigidBodyWorld *UNUSED(rbw), +static void scene_foreach_rigidbodyworldSceneLooper(struct RigidBodyWorld * /*rbw*/, ID **id_pointer, void *user_data, int cb_flag) @@ -1691,7 +1691,7 @@ static void scene_undo_preserve(BlendLibReader *reader, ID *id_new, ID *id_old) } } -static void scene_lib_override_apply_post(ID *id_dst, ID *UNUSED(id_src)) +static void scene_lib_override_apply_post(ID *id_dst, ID * /*id_src*/) { Scene *scene = (Scene *)id_dst; @@ -2637,7 +2637,7 @@ void BKE_scene_update_sound(Depsgraph *depsgraph, Main *bmain) BKE_sound_update_scene(depsgraph, scene); } -void BKE_scene_update_tag_audio_volume(Depsgraph *UNUSED(depsgraph), Scene *scene) +void BKE_scene_update_tag_audio_volume(Depsgraph * /*depsgraph*/, Scene *scene) { BLI_assert(DEG_is_evaluated_id(&scene->id)); /* The volume is actually updated in BKE_scene_update_sound(), from either diff --git a/source/blender/blenkernel/intern/simulation.cc b/source/blender/blenkernel/intern/simulation.cc index 9d4d6a4e350..f399becfa89 100644 --- a/source/blender/blenkernel/intern/simulation.cc +++ b/source/blender/blenkernel/intern/simulation.cc @@ -167,8 +167,8 @@ void *BKE_simulation_add(Main *bmain, const char *name) return simulation; } -void BKE_simulation_data_update(Depsgraph *UNUSED(depsgraph), - Scene *UNUSED(scene), - Simulation *UNUSED(simulation)) +void BKE_simulation_data_update(Depsgraph * /*depsgraph*/, + Scene * /*scene*/, + Simulation * /*simulation*/) { } diff --git a/source/blender/blenkernel/intern/subdiv_mesh.cc b/source/blender/blenkernel/intern/subdiv_mesh.cc index 14695718804..de76de9606b 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.cc +++ b/source/blender/blenkernel/intern/subdiv_mesh.cc @@ -514,7 +514,7 @@ static bool subdiv_mesh_topology_info(const SubdivForeachContext *foreach_contex const int num_edges, const int num_loops, const int num_polygons, - const int *UNUSED(subdiv_polygon_offset)) + const int * /*subdiv_polygon_offset*/) { /* Multi-resolution grid data will be applied or become invalid after subdivision, * so don't try to preserve it and use memory. Crease values should also not be interpolated. */ @@ -626,7 +626,7 @@ static void evaluate_vertex_and_apply_displacement_interpolate( static void subdiv_mesh_vertex_displacement_every_corner_or_edge( const SubdivForeachContext *foreach_context, - void *UNUSED(tls), + void * /*tls*/, const int ptex_face_index, const float u, const float v, @@ -643,9 +643,9 @@ static void subdiv_mesh_vertex_displacement_every_corner( const int ptex_face_index, const float u, const float v, - const int UNUSED(coarse_vertex_index), - const int UNUSED(coarse_poly_index), - const int UNUSED(coarse_corner), + const int /*coarse_vertex_index*/, + const int /*coarse_poly_index*/, + const int /*coarse_corner*/, const int subdiv_vertex_index) { subdiv_mesh_vertex_displacement_every_corner_or_edge( @@ -657,9 +657,9 @@ static void subdiv_mesh_vertex_displacement_every_edge(const SubdivForeachContex const int ptex_face_index, const float u, const float v, - const int UNUSED(coarse_edge_index), - const int UNUSED(coarse_poly_index), - const int UNUSED(coarse_corner), + const int /*coarse_edge_index*/, + const int /*coarse_poly_index*/, + const int /*coarse_corner*/, const int subdiv_vertex_index) { subdiv_mesh_vertex_displacement_every_corner_or_edge( @@ -667,13 +667,13 @@ static void subdiv_mesh_vertex_displacement_every_edge(const SubdivForeachContex } static void subdiv_mesh_vertex_corner(const SubdivForeachContext *foreach_context, - void *UNUSED(tls), + void * /*tls*/, const int ptex_face_index, const float u, const float v, const int coarse_vertex_index, - const int UNUSED(coarse_poly_index), - const int UNUSED(coarse_corner), + const int /*coarse_poly_index*/, + const int /*coarse_corner*/, const int subdiv_vertex_index) { BLI_assert(coarse_vertex_index != ORIGINDEX_NONE); @@ -717,7 +717,7 @@ static void subdiv_mesh_vertex_edge(const SubdivForeachContext *foreach_context, const int ptex_face_index, const float u, const float v, - const int UNUSED(coarse_edge_index), + const int /*coarse_edge_index*/, const int coarse_poly_index, const int coarse_corner, const int subdiv_vertex_index) @@ -808,10 +808,10 @@ static void subdiv_copy_edge_data(SubdivMeshContext *ctx, } static void subdiv_mesh_edge(const SubdivForeachContext *foreach_context, - void *UNUSED(tls), + void * /*tls*/, const int coarse_edge_index, const int subdiv_edge_index, - const bool UNUSED(is_loose), + const bool /*is_loose*/, const int subdiv_v1, const int subdiv_v2) { @@ -902,7 +902,7 @@ static void subdiv_mesh_loop(const SubdivForeachContext *foreach_context, const int ptex_face_index, const float u, const float v, - const int UNUSED(coarse_loop_index), + const int /*coarse_loop_index*/, const int coarse_poly_index, const int coarse_corner, const int subdiv_loop_index, @@ -938,7 +938,7 @@ static void subdiv_copy_poly_data(const SubdivMeshContext *ctx, } static void subdiv_mesh_poly(const SubdivForeachContext *foreach_context, - void *UNUSED(tls), + void * /*tls*/, const int coarse_poly_index, const int subdiv_poly_index, const int start_loop_index, @@ -960,7 +960,7 @@ static void subdiv_mesh_poly(const SubdivForeachContext *foreach_context, * \{ */ static void subdiv_mesh_vertex_loose(const SubdivForeachContext *foreach_context, - void *UNUSED(tls), + void * /*tls*/, const int coarse_vertex_index, const int subdiv_vertex_index) { @@ -1098,7 +1098,7 @@ static void subdiv_mesh_vertex_of_loose_edge_interpolate(SubdivMeshContext *ctx, } static void subdiv_mesh_vertex_of_loose_edge(const SubdivForeachContext *foreach_context, - void *UNUSED(tls), + void * /*tls*/, const int coarse_edge_index, const float u, const int subdiv_vertex_index) diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index 6418523a614..7c54b4d3f2f 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -363,7 +363,7 @@ struct VolumeGrid { is_loaded = false; } - void clear_reference(const char *UNUSED(volume_name)) + void clear_reference(const char * /*volume_name*/) { /* Clear any reference to a grid in the file cache. */ local_grid = grid()->copyGridWithNewTree(); @@ -515,10 +515,7 @@ static void volume_init_data(ID *id) BLI_strncpy(volume->velocity_grid, "velocity", sizeof(volume->velocity_grid)); } -static void volume_copy_data(Main *UNUSED(bmain), - ID *id_dst, - const ID *id_src, - const int UNUSED(flag)) +static void volume_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int /*flag*/) { Volume *volume_dst = (Volume *)id_dst; const Volume *volume_src = (const Volume *)id_src; |