[Bf-blender-cvs] [1f6846fa4e3] master: Cleanup: remove UNUSED(..) from public function declarations

Campbell Barton noreply at git.blender.org
Tue Jan 5 13:10:30 CET 2021


Commit: 1f6846fa4e3d957b438630afc167d5ac539723f4
Author: Campbell Barton
Date:   Tue Jan 5 23:08:15 2021 +1100
Branches: master
https://developer.blender.org/rB1f6846fa4e3d957b438630afc167d5ac539723f4

Cleanup: remove UNUSED(..) from public function declarations

This doesn't serve any purpose and can become out of sync
with the function it's self without reporting warnings.

===================================================================

M	intern/guardedalloc/intern/mallocn_intern.h
M	source/blender/blenlib/BLI_edgehash.h
M	source/blender/bmesh/intern/bmesh_edgeloop.h
M	source/blender/bmesh/intern/bmesh_interp.h
M	source/blender/draw/engines/workbench/workbench_private.h
M	source/blender/draw/intern/DRW_render.h
M	source/blender/editors/include/ED_keyframes_draw.h
M	source/blender/editors/interface/interface_intern.h
M	source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
M	source/blender/nodes/composite/node_composite_util.h

===================================================================

diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
index 8fc3e432157..aa956150484 100644
--- a/intern/guardedalloc/intern/mallocn_intern.h
+++ b/intern/guardedalloc/intern/mallocn_intern.h
@@ -118,27 +118,27 @@ void MEM_lockfree_freeN(void *vmemh);
 void *MEM_lockfree_dupallocN(const void *vmemh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
 void *MEM_lockfree_reallocN_id(void *vmemh,
                                size_t len,
-                               const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                               const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(2);
 void *MEM_lockfree_recallocN_id(void *vmemh,
                                 size_t len,
-                                const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                                const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(2);
-void *MEM_lockfree_callocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+void *MEM_lockfree_callocN(size_t len, const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
 void *MEM_lockfree_calloc_arrayN(size_t len,
                                  size_t size,
-                                 const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                                 const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1, 2) ATTR_NONNULL(3);
-void *MEM_lockfree_mallocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+void *MEM_lockfree_mallocN(size_t len, const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
 void *MEM_lockfree_malloc_arrayN(size_t len,
                                  size_t size,
-                                 const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                                 const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1, 2) ATTR_NONNULL(3);
 void *MEM_lockfree_mallocN_aligned(size_t len,
                                    size_t alignment,
-                                   const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                                   const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1) ATTR_NONNULL(3);
 void MEM_lockfree_printmemlist_pydict(void);
 void MEM_lockfree_printmemlist(void);
@@ -161,27 +161,27 @@ void MEM_guarded_freeN(void *vmemh);
 void *MEM_guarded_dupallocN(const void *vmemh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
 void *MEM_guarded_reallocN_id(void *vmemh,
                               size_t len,
-                              const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                              const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(2);
 void *MEM_guarded_recallocN_id(void *vmemh,
                                size_t len,
-                               const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                               const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(2);
-void *MEM_guarded_callocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+void *MEM_guarded_callocN(size_t len, const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
 void *MEM_guarded_calloc_arrayN(size_t len,
                                 size_t size,
-                                const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                                const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1, 2) ATTR_NONNULL(3);
-void *MEM_guarded_mallocN(size_t len, const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+void *MEM_guarded_mallocN(size_t len, const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
 void *MEM_guarded_malloc_arrayN(size_t len,
                                 size_t size,
-                                const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                                const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1, 2) ATTR_NONNULL(3);
 void *MEM_guarded_mallocN_aligned(size_t len,
                                   size_t alignment,
-                                  const char *UNUSED(str)) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
+                                  const char *str) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
     ATTR_ALLOC_SIZE(1) ATTR_NONNULL(3);
 void MEM_guarded_printmemlist_pydict(void);
 void MEM_guarded_printmemlist(void);
diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h
index a53a1b252eb..184e3bb57e7 100644
--- a/source/blender/blenlib/BLI_edgehash.h
+++ b/source/blender/blenlib/BLI_edgehash.h
@@ -75,7 +75,7 @@ bool BLI_edgehash_remove(EdgeHash *eh,
 void *BLI_edgehash_popkey(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
 bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
 int BLI_edgehash_len(EdgeHash *eh) ATTR_WARN_UNUSED_RESULT;
-void BLI_edgehash_clear_ex(EdgeHash *eh, EdgeHashFreeFP free_value, const uint UNUSED(reserve));
+void BLI_edgehash_clear_ex(EdgeHash *eh, EdgeHashFreeFP free_value, const uint reserve);
 void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP free_value);
 
 EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.h b/source/blender/bmesh/intern/bmesh_edgeloop.h
index ac24389d455..34fc4c0ccc1 100644
--- a/source/blender/bmesh/intern/bmesh_edgeloop.h
+++ b/source/blender/bmesh/intern/bmesh_edgeloop.h
@@ -45,7 +45,7 @@ void BM_mesh_edgeloops_calc_normal(BMesh *bm, struct ListBase *eloops);
 void BM_mesh_edgeloops_calc_normal_aligned(BMesh *bm,
                                            struct ListBase *eloops,
                                            const float no_align[3]);
-void BM_mesh_edgeloops_calc_order(BMesh *UNUSED(bm), ListBase *eloops, const bool use_normals);
+void BM_mesh_edgeloops_calc_order(BMesh *bm, ListBase *eloops, const bool use_normals);
 
 /* single edgeloop */
 struct BMEdgeLoopStore *BM_edgeloop_copy(struct BMEdgeLoopStore *el_store);
diff --git a/source/blender/bmesh/intern/bmesh_interp.h b/source/blender/bmesh/intern/bmesh_interp.h
index 0399b796cfd..c77281bd798 100644
--- a/source/blender/bmesh/intern/bmesh_interp.h
+++ b/source/blender/bmesh/intern/bmesh_interp.h
@@ -31,7 +31,7 @@ void BM_loop_interp_multires_ex(BMesh *bm,
                                 const int cd_loop_mdisp_offset);
 void BM_loop_interp_multires(BMesh *bm, BMLoop *l_dst, const BMFace *f_src);
 
-void BM_face_interp_multires_ex(BMesh *UNUSED(bm),
+void BM_face_interp_multires_ex(BMesh *bm,
                                 BMFace *f_dst,
                                 const BMFace *f_src,
                                 const float f_dst_center[3],
diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h
index 81793367768..f3ff0616668 100644
--- a/source/blender/draw/engines/workbench/workbench_private.h
+++ b/source/blender/draw/engines/workbench/workbench_private.h
@@ -513,7 +513,7 @@ struct GPUUniformBuf *workbench_material_ubo_alloc(WORKBENCH_PrivateData *wpd);
 void workbench_volume_engine_init(WORKBENCH_Data *vedata);
 void workbench_volume_cache_init(WORKBENCH_Data *vedata);
 void workbench_volume_cache_populate(WORKBENCH_Data *vedata,
-                                     struct Scene *UNUSED(scene),
+                                     struct Scene *scene,
                                      struct Object *ob,
                                      struct ModifierData *md,
                                      eV3DShadingColorType color_type);
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h
index 0b4862ecb8d..f133f3bc6d7 100644
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@ -471,7 +471,7 @@ void DRW_buffer_add_entry_array(DRWCallBuffer *callbuf, const void *attr[], uint
   } while (0)
 
 /* Can only be called during iter phase. */
-uint32_t DRW_object_resource_id_get(Object *UNUSED(ob));
+uint32_t DRW_object_resource_id_get(Object *ob);
 
 void DRW_shgroup_state_enable(DRWShadingGroup *shgroup, DRWState state);
 void DRW_shgroup_state_disable(DRWShadingGroup *shgroup, DRWState state);
diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h
index 1a2c2936efe..3cc77887b1a 100644
--- a/source/blender/editors/include/ED_keyframes_draw.h
+++ b/source/blender/editors/include/ED_keyframes_draw.h
@@ -255,9 +255,7 @@ void gpencil_to_keylist(struct bDopeSheet *ads,
 /* Grease Pencil Layer */
 void gpl_to_keylist(struct bDopeSheet *ads, struct bGPDlayer *gpl, struct DLRBT_Tree *keys);
 /* Mask */
-void mask_to_keylist(struct bDopeSheet *UNUSED(ads),
-                     struct MaskLayer *masklay,
-                     struct DLRBT_Tree *keys);
+void mask_to_keylist(struct bDopeSheet *ads, struct MaskLayer *masklay, struct DLRBT_Tree *keys);
 
 /* ActKeyColumn API ---------------- */
 /* Comparator callback used for ActKeyColumns and cframe float-value pointer */
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 441e6db331d..991e8aaf89a 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -983,7 +983,7 @@ const struct uiWidgetColors *ui_tooltip_get_theme(void);
 
 void ui_draw_widget_menu_back_color(const rcti *rect, bool use_shadow, const float color[4]);
 void ui_draw_widget_menu_back(const rcti *rect, bool use_shadow);
-void ui_draw_tooltip_background(const struct uiStyle *UNUSED(style), uiBlock *block, rcti *rect);
+void ui_draw_tooltip_background(const struct uiStyle *style, uiBlock *block, rcti *rect);
 
 extern void ui

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list