Cleanup: hide 'UNUSED' macro definition for C++

This may allow the `C4100` warning to be re-enabled in the MSVC for C++.

Differential Revision: https://developer.blender.org/D16828
This commit is contained in:
Germano Cavalcante 2022-12-20 15:51:47 -03:00
parent 6383ed9956
commit fb7f12dc40
Notes: blender-bot 2023-02-14 10:09:24 +01:00
Referenced by commit 834ca5d682, GPU: Fix Shader Builder stubs after removal of UNUSED macro in C++
56 changed files with 189 additions and 198 deletions

View File

@ -83,7 +83,12 @@ BLI_INLINE CCGElem *CCG_elem_next(const CCGKey *key, CCGElem *elem);
/* inline definitions follow */
BLI_INLINE float *CCG_elem_co(const CCGKey *UNUSED(key), CCGElem *elem)
BLI_INLINE float *CCG_elem_co(const CCGKey *
#ifndef __cplusplus
UNUSED(key)
#endif
,
CCGElem *elem)
{
return (float *)elem;
}

View File

@ -713,7 +713,7 @@ static float cloth_shrink_factor(ClothModifierData *clmd, ClothVertex *verts, in
}
static bool cloth_from_object(
Object *ob, ClothModifierData *clmd, Mesh *mesh, float UNUSED(framenr), int first)
Object *ob, ClothModifierData *clmd, Mesh *mesh, float /*framenr*/, int first)
{
int i = 0;
ClothVertex *verts = nullptr;

View File

@ -307,9 +307,9 @@ static void data_transfer_dtdata_type_preprocess(Mesh *me_src,
}
}
static void data_transfer_dtdata_type_postprocess(Object *UNUSED(ob_src),
Object *UNUSED(ob_dst),
Mesh *UNUSED(me_src),
static void data_transfer_dtdata_type_postprocess(Object * /*ob_src*/,
Object * /*ob_dst*/,
Mesh * /*me_src*/,
Mesh *me_dst,
const int dtdata_type,
const bool changed)

View File

@ -51,10 +51,7 @@
#include "BLO_read_write.h"
static void shapekey_copy_data(Main *UNUSED(bmain),
ID *id_dst,
const ID *id_src,
const int UNUSED(flag))
static void shapekey_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, const int /*flag*/)
{
Key *key_dst = (Key *)id_dst;
const Key *key_src = (const Key *)id_src;
@ -2064,7 +2061,7 @@ int BKE_keyblock_curve_element_count(const ListBase *nurb)
return tot;
}
void BKE_keyblock_update_from_curve(const Curve *UNUSED(cu), KeyBlock *kb, const ListBase *nurb)
void BKE_keyblock_update_from_curve(const Curve * /*cu*/, KeyBlock *kb, const ListBase *nurb)
{
Nurb *nu;
BezTriple *bezt;
@ -2178,7 +2175,7 @@ static void keyblock_data_convert_to_curve(const float *fp, ListBase *nurb, int
}
}
void BKE_keyblock_convert_to_curve(KeyBlock *kb, Curve *UNUSED(cu), ListBase *nurb)
void BKE_keyblock_convert_to_curve(KeyBlock *kb, Curve * /*cu*/, ListBase *nurb)
{
const float *fp = static_cast<const float *>(kb->data);
const int tot = min_ii(kb->totelem, BKE_keyblock_curve_element_count(nurb));

View File

@ -489,7 +489,7 @@ static void layer_collections_copy_data(ViewLayer *view_layer_dst,
}
void BKE_view_layer_copy_data(Scene *scene_dst,
const Scene *UNUSED(scene_src),
const Scene * /*scene_src*/,
ViewLayer *view_layer_dst,
const ViewLayer *view_layer_src,
const int flag)
@ -1257,8 +1257,8 @@ static bool view_layer_objects_base_cache_validate(ViewLayer *view_layer, LayerC
return is_valid;
}
#else
static bool view_layer_objects_base_cache_validate(ViewLayer *UNUSED(view_layer),
LayerCollection *UNUSED(layer))
static bool view_layer_objects_base_cache_validate(ViewLayer * /*view_layer*/,
LayerCollection * /*layer*/)
{
return true;
}
@ -1650,7 +1650,7 @@ static void layer_collection_flag_unset_recursive(LayerCollection *lc, const int
}
}
void BKE_layer_collection_isolate_global(Scene *UNUSED(scene),
void BKE_layer_collection_isolate_global(Scene * /*scene*/,
ViewLayer *view_layer,
LayerCollection *lc,
bool extend)
@ -2266,7 +2266,7 @@ void BKE_view_layer_bases_in_mode_iterator_next(BLI_Iterator *iter)
iter->valid = false;
}
void BKE_view_layer_bases_in_mode_iterator_end(BLI_Iterator *UNUSED(iter))
void BKE_view_layer_bases_in_mode_iterator_end(BLI_Iterator * /*iter*/)
{
/* do nothing */
}
@ -2535,12 +2535,12 @@ void BKE_view_layer_set_active_aov(ViewLayer *view_layer, ViewLayerAOV *aov)
}
static void bke_view_layer_verify_aov_cb(void *userdata,
Scene *UNUSED(scene),
ViewLayer *UNUSED(view_layer),
Scene * /*scene*/,
ViewLayer * /*view_layer*/,
const char *name,
int UNUSED(channels),
const char *UNUSED(chanid),
eNodeSocketDatatype UNUSED(type))
int /*channels*/,
const char * /*chanid*/,
eNodeSocketDatatype /*type*/)
{
GHash *name_count = static_cast<GHash *>(userdata);
void **value_p;

View File

@ -628,8 +628,8 @@ static void direct_link_linestyle_thickness_modifier(BlendDataReader *reader,
}
}
static void direct_link_linestyle_geometry_modifier(BlendDataReader *UNUSED(reader),
LineStyleModifier *UNUSED(modifier))
static void direct_link_linestyle_geometry_modifier(BlendDataReader * /*reader*/,
LineStyleModifier * /*modifier*/)
{
}
@ -1147,7 +1147,7 @@ LineStyleModifier *BKE_linestyle_alpha_modifier_add(FreestyleLineStyle *linestyl
LineStyleModifier *BKE_linestyle_alpha_modifier_copy(FreestyleLineStyle *linestyle,
const LineStyleModifier *m,
const int UNUSED(flag))
const int /*flag*/)
{
LineStyleModifier *new_m;
@ -1735,7 +1735,7 @@ LineStyleModifier *BKE_linestyle_geometry_modifier_add(FreestyleLineStyle *lines
LineStyleModifier *BKE_linestyle_geometry_modifier_copy(FreestyleLineStyle *linestyle,
const LineStyleModifier *m,
const int UNUSED(flag))
const int /*flag*/)
{
LineStyleModifier *new_m;

View File

@ -1411,7 +1411,7 @@ static bool ntree_foreach_texnode_recursive(bNodeTree *nodetree,
return true;
}
static bool count_texture_nodes_cb(bNode *UNUSED(node), void *userdata)
static bool count_texture_nodes_cb(bNode * /*node*/, void *userdata)
{
(*((int *)userdata))++;
return true;

View File

@ -626,7 +626,7 @@ PointDensity *BKE_texture_pointdensity_add(void)
return pd;
}
PointDensity *BKE_texture_pointdensity_copy(const PointDensity *pd, const int UNUSED(flag))
PointDensity *BKE_texture_pointdensity_copy(const PointDensity *pd, const int /*flag*/)
{
PointDensity *pdn;

View File

@ -664,11 +664,13 @@ extern bool BLI_memory_is_zero(const void *arr, size_t arr_size);
/** \name Unused Function/Argument Macros
* \{ */
#ifndef __cplusplus
/* UNUSED macro, for function argument */
#if defined(__GNUC__) || defined(__clang__)
# define UNUSED(x) UNUSED_##x __attribute__((__unused__))
#else
# define UNUSED(x) UNUSED_##x
# if defined(__GNUC__) || defined(__clang__)
# define UNUSED(x) UNUSED_##x __attribute__((__unused__))
# else
# define UNUSED(x) UNUSED_##x
# endif
#endif
/**

View File

@ -139,9 +139,9 @@ static void bm_vert_calc_normals_impl(BMVert *v)
normalize_v3_v3(v_no, v->co);
}
static void bm_vert_calc_normals_cb(void *UNUSED(userdata),
static void bm_vert_calc_normals_cb(void * /*userdata*/,
MempoolIterData *mp_v,
const TaskParallelTLS *__restrict UNUSED(tls))
const TaskParallelTLS *__restrict /*tls*/)
{
BMVert *v = (BMVert *)mp_v;
bm_vert_calc_normals_impl(v);
@ -192,7 +192,7 @@ static void bm_vert_calc_normals_with_coords(BMVert *v, BMVertsCalcNormalsWithCo
static void bm_vert_calc_normals_with_coords_cb(void *userdata,
MempoolIterData *mp_v,
const TaskParallelTLS *__restrict UNUSED(tls))
const TaskParallelTLS *__restrict /*tls*/)
{
BMVertsCalcNormalsWithCoordsData *data = static_cast<BMVertsCalcNormalsWithCoordsData *>(
userdata);
@ -224,9 +224,9 @@ static void bm_mesh_verts_calc_normals(BMesh *bm,
}
}
static void bm_face_calc_normals_cb(void *UNUSED(userdata),
static void bm_face_calc_normals_cb(void * /*userdata*/,
MempoolIterData *mp_f,
const TaskParallelTLS *__restrict UNUSED(tls))
const TaskParallelTLS *__restrict /*tls*/)
{
BMFace *f = (BMFace *)mp_f;
@ -262,20 +262,20 @@ void BM_mesh_normals_update(BMesh *bm)
* \{ */
static void bm_partial_faces_parallel_range_calc_normals_cb(
void *userdata, const int iter, const TaskParallelTLS *__restrict UNUSED(tls))
void *userdata, const int iter, const TaskParallelTLS *__restrict /*tls*/)
{
BMFace *f = ((BMFace **)userdata)[iter];
BM_face_calc_normal(f, f->no);
}
static void bm_partial_verts_parallel_range_calc_normal_cb(
void *userdata, const int iter, const TaskParallelTLS *__restrict UNUSED(tls))
void *userdata, const int iter, const TaskParallelTLS *__restrict /*tls*/)
{
BMVert *v = ((BMVert **)userdata)[iter];
bm_vert_calc_normals_impl(v);
}
void BM_mesh_normals_update_with_partial_ex(BMesh *UNUSED(bm),
void BM_mesh_normals_update_with_partial_ex(BMesh * /*bm*/,
const BMPartialUpdate *bmpinfo,
const struct BMeshNormalsUpdate_Params *params)
{
@ -1192,7 +1192,7 @@ static void bm_mesh_loops_calc_normals_for_vert_init_fn(const void *__restrict u
}
static void bm_mesh_loops_calc_normals_for_vert_reduce_fn(const void *__restrict userdata,
void *__restrict UNUSED(chunk_join),
void *__restrict /*chunk_join*/,
void *__restrict chunk)
{
auto *data = static_cast<const BMLoopsCalcNormalsWithCoordsData *>(userdata);

View File

@ -60,7 +60,7 @@ struct MetaDataExtractCallbackData {
static void extract_cryptomatte_meta_data(void *_data,
const char *propname,
char *propvalue,
int UNUSED(len));
int /*len*/);
};
} // namespace blender::compositor

View File

@ -1319,9 +1319,7 @@ static char *eevee_get_defines(int options)
return str;
}
static void eevee_material_post_eval(void *UNUSED(thunk),
GPUMaterial *mat,
GPUCodegenOutput *codegen)
static void eevee_material_post_eval(void * /*thunk*/, GPUMaterial *mat, GPUCodegenOutput *codegen)
{
/* Fetch material-specific Create-info's and source. */
uint64_t options = GPU_material_uuid_get(mat);
@ -1344,7 +1342,7 @@ static void eevee_material_post_eval(void *UNUSED(thunk),
}
static struct GPUMaterial *eevee_material_get_ex(
struct Scene *UNUSED(scene), Material *ma, World *wo, int options, bool deferred)
struct Scene * /*scene*/, Material *ma, World *wo, int options, bool deferred)
{
BLI_assert(ma || wo);
const bool is_volume = (options & VAR_MAT_VOLUME) != 0;

View File

@ -88,7 +88,7 @@ class SpaceImageAccessor : public AbstractSpaceAccessor {
}
void init_ss_to_texture_matrix(const ARegion *region,
const float UNUSED(image_resolution[2]),
const float /*image_resolution*/[2],
float r_uv_to_texture[4][4]) const override
{
unit_m4(r_uv_to_texture);

View File

@ -271,7 +271,7 @@ static void curves_batch_cache_fill_segments_proc_pos(
static void curves_batch_cache_ensure_procedural_pos(const Curves &curves,
CurvesEvalCache &cache,
GPUMaterial *UNUSED(gpu_material))
GPUMaterial * /*gpu_material*/)
{
if (cache.proc_point_buf == nullptr || DRW_vbo_requested(cache.proc_point_buf)) {
/* Initialize vertex format. */
@ -391,7 +391,7 @@ static void curves_batch_cache_ensure_procedural_final_attr(CurvesEvalCache &cac
const GPUVertFormat *format,
const int subdiv,
const int index,
const char *UNUSED(name))
const char * /*name*/)
{
CurvesEvalFinalCache &final_cache = cache.final[subdiv];
final_cache.attributes_buf[index] = GPU_vertbuf_create_with_format_ex(

View File

@ -386,8 +386,8 @@ static void gpencil_buffer_add_fill(GPUIndexBufBuilder *ibo, const bGPDstroke *g
}
}
static void gpencil_stroke_iter_cb(bGPDlayer *UNUSED(gpl),
bGPDframe *UNUSED(gpf),
static void gpencil_stroke_iter_cb(bGPDlayer * /*gpl*/,
bGPDframe * /*gpf*/,
bGPDstroke *gps,
void *thunk)
{
@ -398,8 +398,8 @@ static void gpencil_stroke_iter_cb(bGPDlayer *UNUSED(gpl),
gpencil_buffer_add_stroke(&iter->ibo, iter->verts, iter->cols, gps);
}
static void gpencil_object_verts_count_cb(bGPDlayer *UNUSED(gpl),
bGPDframe *UNUSED(gpf),
static void gpencil_object_verts_count_cb(bGPDlayer * /*gpl*/,
bGPDframe * /*gpf*/,
bGPDstroke *gps,
void *thunk)
{
@ -503,8 +503,8 @@ GPUVertBuf *DRW_cache_gpencil_color_buffer_get(Object *ob, int cfra)
return cache->vbo_col;
}
static void gpencil_lines_indices_cb(bGPDlayer *UNUSED(gpl),
bGPDframe *UNUSED(gpf),
static void gpencil_lines_indices_cb(bGPDlayer * /*gpl*/,
bGPDframe * /*gpf*/,
bGPDstroke *gps,
void *thunk)
{
@ -785,7 +785,7 @@ static void gpencil_edit_stroke_iter_cb(bGPDlayer *gpl,
}
static void gpencil_edit_curve_stroke_count_cb(bGPDlayer *gpl,
bGPDframe *UNUSED(gpf),
bGPDframe * /*gpf*/,
bGPDstroke *gps,
void *thunk)
{
@ -821,7 +821,7 @@ static uint32_t gpencil_beztriple_vflag_get(char flag,
}
static void gpencil_edit_curve_stroke_iter_cb(bGPDlayer *gpl,
bGPDframe *UNUSED(gpf),
bGPDframe * /*gpf*/,
bGPDstroke *gps,
void *thunk)
{

View File

@ -646,7 +646,7 @@ static int geometry_color_attribute_convert_invoke(bContext *C,
return WM_operator_props_dialog_popup(C, op, 300);
}
static void geometry_color_attribute_convert_ui(bContext *UNUSED(C), wmOperator *op)
static void geometry_color_attribute_convert_ui(bContext * /*C*/, wmOperator *op)
{
uiLayout *layout = op->layout;
uiLayoutSetPropSep(layout, true);

View File

@ -115,7 +115,7 @@ static void shortcut_free_operator_property(IDProperty *prop)
}
}
static void but_shortcut_name_func(bContext *C, void *arg1, int UNUSED(event))
static void but_shortcut_name_func(bContext *C, void *arg1, int /*event*/)
{
uiBut *but = (uiBut *)arg1;
char shortcut_str[128];
@ -419,7 +419,7 @@ static void popup_user_menu_add_or_replace_func(bContext *C, void *arg1, void *
ui_but_user_menu_add(C, but, um);
}
static void popup_user_menu_remove_func(bContext *UNUSED(C), void *arg1, void *arg2)
static void popup_user_menu_remove_func(bContext * /*C*/, void *arg1, void *arg2)
{
bUserMenu *um = static_cast<bUserMenu *>(arg1);
bUserMenuItem *umi = static_cast<bUserMenuItem *>(arg2);

View File

@ -344,7 +344,7 @@ static void vicon_handletype_auto_clamp_draw(int x, int y, int w, int h, float a
vicon_keytype_draw_wrapper(x, y, w, h, alpha, BEZT_KEYTYPE_KEYFRAME, KEYFRAME_HANDLE_AUTO_CLAMP);
}
static void vicon_colorset_draw(int index, int x, int y, int w, int h, float UNUSED(alpha))
static void vicon_colorset_draw(int index, int x, int y, int w, int h, float /*alpha*/)
{
bTheme *btheme = UI_GetTheme();
const ThemeWireColor *cs = &btheme->tarm[index];
@ -408,7 +408,7 @@ DEF_ICON_VECTOR_COLORSET_DRAW_NTH(20, 19)
# undef DEF_ICON_VECTOR_COLORSET_DRAW_NTH
static void vicon_collection_color_draw(
short color_tag, int x, int y, int w, int UNUSED(h), float UNUSED(alpha))
short color_tag, int x, int y, int w, int /*h*/, float /*alpha*/)
{
bTheme *btheme = UI_GetTheme();
const ThemeCollectionColor *collection_color = &btheme->collection_color[color_tag];
@ -444,7 +444,7 @@ DEF_ICON_COLLECTION_COLOR_DRAW(08, COLLECTION_COLOR_08);
# undef DEF_ICON_COLLECTION_COLOR_DRAW
static void vicon_strip_color_draw(
short color_tag, int x, int y, int w, int UNUSED(h), float UNUSED(alpha))
short color_tag, int x, int y, int w, int /*h*/, float /*alpha*/)
{
bTheme *btheme = UI_GetTheme();
const ThemeStripColor *strip_color = &btheme->strip_color[color_tag];
@ -476,7 +476,7 @@ DEF_ICON_STRIP_COLOR_DRAW(09, SEQUENCE_COLOR_09);
# define ICON_INDIRECT_DATA_ALPHA 0.6f
static void vicon_strip_color_draw_library_data_indirect(
int x, int y, int w, int UNUSED(h), float alpha)
int x, int y, int w, int /*h*/, float alpha)
{
const float aspect = float(ICON_DEFAULT_WIDTH) / float(w);
@ -492,7 +492,7 @@ static void vicon_strip_color_draw_library_data_indirect(
}
static void vicon_strip_color_draw_library_data_override_noneditable(
int x, int y, int w, int UNUSED(h), float alpha)
int x, int y, int w, int /*h*/, float alpha)
{
const float aspect = float(ICON_DEFAULT_WIDTH) / float(w);
@ -1310,9 +1310,9 @@ static void ui_id_preview_image_render_size(
const bContext *C, Scene *scene, ID *id, PreviewImage *pi, int size, const bool use_job);
static void ui_studiolight_icon_job_exec(void *customdata,
bool *UNUSED(stop),
bool *UNUSED(do_update),
float *UNUSED(progress))
bool * /*stop*/,
bool * /*do_update*/,
float * /*progress*/)
{
Icon **tmp = (Icon **)customdata;
Icon *icon = *tmp;
@ -1520,7 +1520,7 @@ static void icon_draw_rect(float x,
float y,
int w,
int h,
float UNUSED(aspect),
float /*aspect*/,
int rw,
int rh,
uint *rect,
@ -1689,7 +1689,7 @@ static void icon_draw_texture_cached(float x,
float h,
int ix,
int iy,
int UNUSED(iw),
int /*iw*/,
int ih,
float alpha,
const float rgb[3],

View File

@ -363,7 +363,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
static void load_tex_cursor_task_cb(void *__restrict userdata,
const int j,
const TaskParallelTLS *__restrict UNUSED(tls))
const TaskParallelTLS *__restrict /*tls*/)
{
LoadTexData *data = static_cast<LoadTexData *>(userdata);
Brush *br = data->br;
@ -1900,7 +1900,7 @@ static void paint_cursor_restore_drawing_state(void)
GPU_line_smooth(false);
}
static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
static void paint_draw_cursor(bContext *C, int x, int y, void * /*unused*/)
{
PaintCursorContext pcontext;
if (!paint_cursor_context_init(C, x, y, &pcontext)) {

View File

@ -5169,7 +5169,7 @@ static void copy_original_alpha_channel(ProjPixel *pixel, bool is_floatbuf)
}
/* Run this for single and multi-threaded painting. */
static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v)
static void do_projectpaint_thread(TaskPool *__restrict /*pool*/, void *ph_v)
{
/* First unpack args from the struct */
ProjPaintState *ps = ((ProjectHandle *)ph_v)->ps;
@ -5733,7 +5733,7 @@ static bool project_paint_op(void *state, const float lastpos[2], const float po
return touch_any;
}
static void paint_proj_stroke_ps(const bContext *UNUSED(C),
static void paint_proj_stroke_ps(const bContext * /*C*/,
void *ps_handle_p,
const float prev_pos[2],
const float pos[2],
@ -6805,7 +6805,7 @@ static void get_default_texture_layer_name_for_object(Object *ob,
static int texture_paint_add_texture_paint_slot_invoke(bContext *C,
wmOperator *op,
const wmEvent *UNUSED(event))
const wmEvent * /*event*/)
{
Object *ob = ED_object_active_context(C);
Material *ma = BKE_object_material_get(ob, ob->actcol);
@ -6958,7 +6958,7 @@ void PAINT_OT_add_texture_paint_slot(wmOperatorType *ot)
"Type of data stored in attribute");
}
static int add_simple_uvs_exec(bContext *C, wmOperator *UNUSED(op))
static int add_simple_uvs_exec(bContext *C, wmOperator * /*op*/)
{
/* no checks here, poll function does them for us */
Main *bmain = CTX_data_main(C);

View File

@ -422,7 +422,7 @@ void buttons_texture_context_compute(const bContext *C, SpaceProperties *sbuts)
}
}
static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg))
static void template_texture_select(bContext *C, void *user_p, void * /*arg*/)
{
/* callback when selecting a texture user in the menu */
SpaceProperties *sbuts = find_space_properties(C);
@ -475,7 +475,7 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg)
ct->index = user->index;
}
static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUSED(arg))
static void template_texture_user_menu(bContext *C, uiLayout *layout, void * /*arg*/)
{
/* callback when opening texture user selection menu, to create buttons. */
SpaceProperties *sbuts = CTX_wm_space_properties(C);

View File

@ -679,7 +679,7 @@ static int set_scale_exec(bContext *C, wmOperator *op)
return do_set_scale(C, op, false, false);
}
static int set_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int set_scale_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
@ -739,7 +739,7 @@ static int set_solution_scale_exec(bContext *C, wmOperator *op)
return do_set_scale(C, op, true, false);
}
static int set_solution_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int set_solution_scale_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
@ -801,7 +801,7 @@ static int apply_solution_scale_exec(bContext *C, wmOperator *op)
return do_set_scale(C, op, false, true);
}
static int apply_solution_scale_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int apply_solution_scale_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);

View File

@ -582,7 +582,7 @@ bool validSnappingNormal(const TransInfo *t)
return false;
}
static bool bm_edge_is_snap_target(BMEdge *e, void *UNUSED(user_data))
static bool bm_edge_is_snap_target(BMEdge *e, void * /*user_data*/)
{
if (BM_elem_flag_test(e, BM_ELEM_SELECT | BM_ELEM_HIDDEN) ||
BM_elem_flag_test(e->v1, BM_ELEM_SELECT) || BM_elem_flag_test(e->v2, BM_ELEM_SELECT)) {
@ -592,7 +592,7 @@ static bool bm_edge_is_snap_target(BMEdge *e, void *UNUSED(user_data))
return true;
}
static bool bm_face_is_snap_target(BMFace *f, void *UNUSED(user_data))
static bool bm_face_is_snap_target(BMFace *f, void * /*user_data*/)
{
if (BM_elem_flag_test(f, BM_ELEM_SELECT | BM_ELEM_HIDDEN)) {
return false;
@ -1043,7 +1043,7 @@ void getSnapPoint(const TransInfo *t, float vec[3])
/** \name Calc Snap
* \{ */
static void snap_calc_view3d_fn(TransInfo *t, float *UNUSED(vec))
static void snap_calc_view3d_fn(TransInfo *t, float * /*vec*/)
{
BLI_assert(t->spacetype == SPACE_VIEW3D);
float loc[3];
@ -1083,7 +1083,7 @@ static void snap_calc_view3d_fn(TransInfo *t, float *UNUSED(vec))
t->tsnap.snapElem = snap_elem;
}
static void snap_calc_uv_fn(TransInfo *t, float *UNUSED(vec))
static void snap_calc_uv_fn(TransInfo *t, float * /*vec*/)
{
BLI_assert(t->spacetype == SPACE_IMAGE);
if (t->tsnap.mode & SCE_SNAP_MODE_VERTEX) {
@ -1112,7 +1112,7 @@ static void snap_calc_uv_fn(TransInfo *t, float *UNUSED(vec))
}
}
static void snap_calc_node_fn(TransInfo *t, float *UNUSED(vec))
static void snap_calc_node_fn(TransInfo *t, float * /*vec*/)
{
BLI_assert(t->spacetype == SPACE_NODE);
if (t->tsnap.mode & (SCE_SNAP_MODE_NODE_X | SCE_SNAP_MODE_NODE_Y)) {
@ -1132,7 +1132,7 @@ static void snap_calc_node_fn(TransInfo *t, float *UNUSED(vec))
}
}
static void snap_calc_sequencer_fn(TransInfo *t, float *UNUSED(vec))
static void snap_calc_sequencer_fn(TransInfo *t, float * /*vec*/)
{
BLI_assert(t->spacetype == SPACE_SEQ);
if (transform_snap_sequencer_calc(t)) {
@ -1477,7 +1477,7 @@ static NodeBorder snapNodeBorder(eSnapMode snap_node_mode)
}
static bool snapNode(ToolSettings *ts,
SpaceNode *UNUSED(snode),
SpaceNode * /*snode*/,
ARegion *region,
bNode *node,
const int mval[2],
@ -1579,7 +1579,7 @@ bool snapNodesTransform(
/** \name snap Grid
* \{ */
static void snap_increment_apply_ex(const TransInfo *UNUSED(t),
static void snap_increment_apply_ex(const TransInfo * /*t*/,
const int max_index,
const float increment_val,
const float aspect[3],
@ -1678,7 +1678,7 @@ float transform_snap_increment_get(const TransInfo *t)
/** \name Generic callbacks
* \{ */
float transform_snap_distance_len_squared_fn(TransInfo *UNUSED(t),
float transform_snap_distance_len_squared_fn(TransInfo * /*t*/,
const float p1[3],
const float p2[3])
{

View File

@ -211,8 +211,7 @@ static std::ostream &operator<<(std::ostream &stream, const GPUOutput *output)
}
/* Trick type to change overload and keep a somewhat nice syntax. */
struct GPUConstant : public GPUInput {
};
struct GPUConstant : public GPUInput {};
/* Print data constructor (i.e: vec2(1.0f, 1.0f)). */
static std::ostream &operator<<(std::ostream &stream, const GPUConstant *input)

View File

@ -78,7 +78,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
}
}
static bool dependsOnTime(struct Scene *UNUSED(scene), ModifierData *md)
static bool dependsOnTime(struct Scene * /*scene*/, ModifierData *md)
{
DisplaceModifierData *dmd = (DisplaceModifierData *)md;
@ -108,9 +108,7 @@ static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void
walk(userData, ob, md, "texture");
}
static bool isDisabled(const struct Scene *UNUSED(scene),
ModifierData *md,
bool UNUSED(useRenderParams))
static bool isDisabled(const struct Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/)
{
DisplaceModifierData *dmd = (DisplaceModifierData *)md;
return ((!dmd->texture && dmd->direction == MOD_DISP_DIR_RGB_XYZ) || dmd->strength == 0.0f);
@ -164,7 +162,7 @@ typedef struct DisplaceUserdata {
static void displaceModifier_do_task(void *__restrict userdata,
const int iter,
const TaskParallelTLS *__restrict UNUSED(tls))
const TaskParallelTLS *__restrict /*tls*/)
{
DisplaceUserdata *data = (DisplaceUserdata *)userdata;
DisplaceModifierData *dmd = data->dmd;

View File

@ -107,7 +107,7 @@ static void initData(ModifierData *md)
md->mode |= eModifierMode_Editmode;
}
static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *UNUSED(ctx), Mesh *mesh)
static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext * /*ctx*/, Mesh *mesh)
{
TriangulateModifierData *tmd = (TriangulateModifierData *)md;
Mesh *result;
@ -119,7 +119,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *UNUSED(ctx)
return result;
}
static void panel_draw(const bContext *UNUSED(C), Panel *panel)
static void panel_draw(const bContext * /*C*/, Panel *panel)
{
uiLayout *layout = panel->layout;

View File

@ -64,12 +64,12 @@ static void node_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>(N_("Value"), "Value_Color").field_source().dependent_field();
}
static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "data_type", 0, "", ICON_NONE);
}
static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_init(bNodeTree * /*tree*/, bNode *node)
{
node->custom1 = CD_PROP_FLOAT;
}

View File

@ -48,21 +48,19 @@ void node_free_standard_storage(bNode *node)
}
}
void node_copy_curves(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_copy_curves(bNodeTree * /*dest_ntree*/, bNode *dest_node, const bNode *src_node)
{
dest_node->storage = BKE_curvemapping_copy(static_cast<CurveMapping *>(src_node->storage));
}
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree),
void node_copy_standard_storage(bNodeTree * /*dest_ntree*/,
bNode *dest_node,
const bNode *src_node)
{
dest_node->storage = MEM_dupallocN(src_node->storage);
}
void *node_initexec_curves(bNodeExecContext *UNUSED(context),
bNode *node,
bNodeInstanceKey UNUSED(key))
void *node_initexec_curves(bNodeExecContext * /*context*/, bNode *node, bNodeInstanceKey /*key*/)
{
BKE_curvemapping_init(static_cast<CurveMapping *>(node->storage));
return nullptr; /* unused return */
@ -177,7 +175,7 @@ void node_math_update(bNodeTree *ntree, bNode *node)
/** \name Labels
* \{ */
void node_blend_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *label, int maxlen)
void node_blend_label(const bNodeTree * /*ntree*/, const bNode *node, char *label, int maxlen)
{
const char *name;
bool enum_label = RNA_enum_name(rna_enum_ramp_blend_items, node->custom1, &name);
@ -187,14 +185,14 @@ void node_blend_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *l
BLI_strncpy(label, IFACE_(name), maxlen);
}
void node_image_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *label, int maxlen)
void node_image_label(const bNodeTree * /*ntree*/, const bNode *node, char *label, int maxlen)
{
/* If there is no loaded image, return an empty string,
* and let nodeLabel() fill in the proper type translation. */
BLI_strncpy(label, (node->id) ? node->id->name + 2 : "", maxlen);
}
void node_math_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *label, int maxlen)
void node_math_label(const bNodeTree * /*ntree*/, const bNode *node, char *label, int maxlen)
{
const char *name;
bool enum_label = RNA_enum_name(rna_enum_node_math_items, node->custom1, &name);
@ -204,7 +202,7 @@ void node_math_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *la
BLI_strncpy(label, CTX_IFACE_(BLT_I18NCONTEXT_ID_NODETREE, name), maxlen);
}
void node_vector_math_label(const bNodeTree *UNUSED(ntree),
void node_vector_math_label(const bNodeTree * /*ntree*/,
const bNode *node,
char *label,
int maxlen)
@ -217,7 +215,7 @@ void node_vector_math_label(const bNodeTree *UNUSED(ntree),
BLI_strncpy(label, IFACE_(name), maxlen);
}
void node_filter_label(const bNodeTree *UNUSED(ntree), const bNode *node, char *label, int maxlen)
void node_filter_label(const bNodeTree * /*ntree*/, const bNode *node, char *label, int maxlen)
{
const char *name;
bool enum_label = RNA_enum_name(rna_enum_node_filter_items, node->custom1, &name);
@ -365,21 +363,21 @@ void node_insert_link_default(bNodeTree *ntree, bNode *node, bNodeLink *link)
/** \name Default value RNA access
* \{ */
float node_socket_get_float(bNodeTree *ntree, bNode *UNUSED(node), bNodeSocket *sock)
float node_socket_get_float(bNodeTree *ntree, bNode * /*node*/, bNodeSocket *sock)
{
PointerRNA ptr;
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
return RNA_float_get(&ptr, "default_value");
}
void node_socket_set_float(bNodeTree *ntree, bNode *UNUSED(node), bNodeSocket *sock, float value)
void node_socket_set_float(bNodeTree *ntree, bNode * /*node*/, bNodeSocket *sock, float value)
{
PointerRNA ptr;
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
RNA_float_set(&ptr, "default_value", value);
}
void node_socket_get_color(bNodeTree *ntree, bNode *UNUSED(node), bNodeSocket *sock, float *value)
void node_socket_get_color(bNodeTree *ntree, bNode * /*node*/, bNodeSocket *sock, float *value)
{
PointerRNA ptr;
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
@ -387,7 +385,7 @@ void node_socket_get_color(bNodeTree *ntree, bNode *UNUSED(node), bNodeSocket *s
}
void node_socket_set_color(bNodeTree *ntree,
bNode *UNUSED(node),
bNode * /*node*/,
bNodeSocket *sock,
const float *value)
{
@ -396,7 +394,7 @@ void node_socket_set_color(bNodeTree *ntree,
RNA_float_set_array(&ptr, "default_value", value);
}
void node_socket_get_vector(bNodeTree *ntree, bNode *UNUSED(node), bNodeSocket *sock, float *value)
void node_socket_get_vector(bNodeTree *ntree, bNode * /*node*/, bNodeSocket *sock, float *value)
{
PointerRNA ptr;
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
@ -404,7 +402,7 @@ void node_socket_get_vector(bNodeTree *ntree, bNode *UNUSED(node), bNodeSocket *
}
void node_socket_set_vector(bNodeTree *ntree,
bNode *UNUSED(node),
bNode * /*node*/,
bNodeSocket *sock,
const float *value)
{

View File

@ -38,11 +38,8 @@
#include "UI_resources.h"
static void texture_get_from_context(const bContext *C,
bNodeTreeType *UNUSED(treetype),
bNodeTree **r_ntree,
ID **r_id,
ID **r_from)
static void texture_get_from_context(
const bContext *C, bNodeTreeType * /*treetype*/, bNodeTree **r_ntree, ID **r_id, ID **r_from)
{
SpaceNode *snode = CTX_wm_space_node(C);
Scene *scene = CTX_data_scene(C);
@ -83,7 +80,7 @@ static void texture_get_from_context(const bContext *C,
}
}
static void foreach_nodeclass(Scene *UNUSED(scene), void *calldata, bNodeClassCallback func)
static void foreach_nodeclass(Scene * /*scene*/, void *calldata, bNodeClassCallback func)
{
func(calldata, NODE_CLASS_INPUT, N_("Input"));
func(calldata, NODE_CLASS_OUTPUT, N_("Output"));
@ -101,7 +98,7 @@ static void foreach_nodeclass(Scene *UNUSED(scene), void *calldata, bNodeClassCa
* it works here, but disabled for consistency
*/
#if 1
static void localize(bNodeTree *localtree, bNodeTree *UNUSED(ntree))
static void localize(bNodeTree *localtree, bNodeTree * /*ntree*/)
{
bNode *node, *node_next;
@ -116,7 +113,7 @@ static void localize(bNodeTree *localtree, bNodeTree *UNUSED(ntree))
}
}
#else
static void localize(bNodeTree *UNUSED(localtree), bNodeTree *UNUSED(ntree))
static void localize(bNodeTree * /*localtree*/, bNodeTree * /*ntree*/)
{
}
#endif
@ -126,7 +123,7 @@ static void update(bNodeTree *ntree)
ntree_update_reroute_nodes(ntree);
}
static bool texture_node_tree_socket_type_valid(bNodeTreeType *UNUSED(ntreetype),
static bool texture_node_tree_socket_type_valid(bNodeTreeType * /*ntreetype*/,
bNodeSocketType *socket_type)
{
return nodeIsStaticSocketType(socket_type) &&
@ -322,7 +319,7 @@ int ntreeTexExecTree(bNodeTree *ntree,
float dyt[3],
int osatex,
const short thread,
const Tex *UNUSED(tex),
const Tex * /*tex*/,
short which_output,
int cfra,
int preview,

View File

@ -23,9 +23,7 @@
#include "node_texture_util.hh"
bool tex_node_poll_default(bNodeType *UNUSED(ntype),
bNodeTree *ntree,
const char **r_disabled_hint)
bool tex_node_poll_default(bNodeType * /*ntype*/, bNodeTree *ntree, const char **r_disabled_hint)
{
if (!STREQ(ntree->idname, "TextureNodeTree")) {
*r_disabled_hint = TIP_("Not a texture node tree");

View File

@ -18,7 +18,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void colorfn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
TexParams np = *p;
float new_co[3];
@ -29,7 +29,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -25,7 +25,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void init(bNodeTree *UNUSED(ntree), bNode *node)
static void init(bNodeTree * /*ntree*/, bNode *node)
{
node->custom3 = 0.5; /* offset */
node->custom4 = 1.0; /* squash */
@ -90,7 +90,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -20,7 +20,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void colorfn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
float x = p->co[0];
float y = p->co[1];
@ -41,7 +41,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -48,13 +48,13 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
}
static void update(bNodeTree *UNUSED(ntree), bNode *node)
static void update(bNodeTree * /*ntree*/, bNode *node)
{
node_combsep_color_label(&node->inputs, (NodeCombSepColorMode)node->custom1);
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -20,7 +20,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void colorfn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
int i;
for (i = 0; i < 4; i++) {
@ -29,7 +29,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -14,13 +14,13 @@ static bNodeSocketTemplate outputs[] = {
};
static void vectorfn(
float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **UNUSED(in), short UNUSED(thread))
float *out, TexParams *p, bNode * /*node*/, bNodeStack ** /*in*/, short /*thread*/)
{
copy_v3_v3(out, p->co);
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -14,7 +14,7 @@
static bNodeSocketTemplate time_outputs[] = {{SOCK_FLOAT, N_("Value")}, {-1, ""}};
static void time_colorfn(
float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(in), short UNUSED(thread))
float *out, TexParams *p, bNode *node, bNodeStack ** /*in*/, short /*thread*/)
{
/* stack order output: fac */
float fac = 0.0f;
@ -30,7 +30,7 @@ static void time_colorfn(
}
static void time_exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,
@ -39,7 +39,7 @@ static void time_exec(void *data,
tex_output(node, execdata, in, out[0], &time_colorfn, static_cast<TexCallData *>(data));
}
static void time_init(bNodeTree *UNUSED(ntree), bNode *node)
static void time_init(bNodeTree * /*ntree*/, bNode *node)
{
node->custom1 = 1;
node->custom2 = 250;
@ -82,7 +82,7 @@ static void rgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in,
}
static void rgb_exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,
@ -91,7 +91,7 @@ static void rgb_exec(void *data,
tex_output(node, execdata, in, out[0], &rgb_colorfn, static_cast<TexCallData *>(data));
}
static void rgb_init(bNodeTree *UNUSED(ntree), bNode *node)
static void rgb_init(bNodeTree * /*ntree*/, bNode *node)
{
node->storage = BKE_curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
}

View File

@ -21,32 +21,32 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void valuefn_r(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void valuefn_r(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
tex_input_rgba(out, in[0], p, thread);
*out = out[0];
}
static void valuefn_g(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void valuefn_g(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
tex_input_rgba(out, in[0], p, thread);
*out = out[1];
}
static void valuefn_b(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void valuefn_b(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
tex_input_rgba(out, in[0], p, thread);
*out = out[2];
}
static void valuefn_a(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void valuefn_a(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
tex_input_rgba(out, in[0], p, thread);
*out = out[3];
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -20,7 +20,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void valuefn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
float co1[3], co2[3];
@ -31,7 +31,7 @@ static void valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -22,7 +22,7 @@ static bNodeSocketTemplate outputs[] = {
};
static void do_hue_sat_fac(
bNode *UNUSED(node), float *out, float hue, float sat, float val, float *in, float fac)
bNode * /*node*/, float *out, float hue, float sat, float val, float *in, float fac)
{
if (fac != 0 && (hue != 0.5f || sat != 1 || val != 1)) {
float col[3], hsv[3], mfac = 1.0f - fac;
@ -78,7 +78,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -13,8 +13,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void colorfn(
float *out, TexParams *p, bNode *node, bNodeStack **UNUSED(in), short UNUSED(thread))
static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack ** /*in*/, short /*thread*/)
{
float x = p->co[0];
float y = p->co[1];
@ -71,7 +70,7 @@ static void colorfn(
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,
@ -80,7 +79,7 @@ static void exec(void *data,
tex_output(node, execdata, in, out[0], &colorfn, static_cast<TexCallData *>(data));
}
static void init(bNodeTree *UNUSED(ntree), bNode *node)
static void init(bNodeTree * /*ntree*/, bNode *node)
{
ImageUser *iuser = MEM_cnew<ImageUser>("node image user");
node->storage = iuser;

View File

@ -19,7 +19,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void colorfn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
float col[4];
@ -34,7 +34,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -306,7 +306,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -40,7 +40,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -18,11 +18,11 @@ static bNodeSocketTemplate inputs[] = {
/* applies to render pipeline */
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *UNUSED(execdata),
bNodeExecData * /*execdata*/,
bNodeStack **in,
bNodeStack **UNUSED(out))
bNodeStack ** /*out*/)
{
TexCallData *cdata = (TexCallData *)data;
TexResult *target = cdata->target;
@ -114,7 +114,7 @@ check_index:
node->custom1 = index;
}
static void init(bNodeTree *UNUSED(ntree), bNode *node)
static void init(bNodeTree * /*ntree*/, bNode *node)
{
TexNodeOutput *tno = MEM_cnew<TexNodeOutput>("TEX_output");
node->storage = tno;

View File

@ -79,7 +79,7 @@ static int count_outputs(bNode *node)
#define ProcNoInputs(name) \
static void name##_map_inputs( \
Tex *UNUSED(tex), bNodeStack **UNUSED(in), TexParams *UNUSED(p), short UNUSED(thread)) \
Tex * /*tex*/, bNodeStack ** /*in*/, TexParams * /*p*/, short /*thread*/) \
{ \
}
@ -90,7 +90,7 @@ static int count_outputs(bNode *node)
texfn(result, p, node, in, &name##_map_inputs, thread); \
} \
static void name##_exec(void *data, \
int UNUSED(thread), \
int /*thread*/, \
bNode *node, \
bNodeExecData *execdata, \
bNodeStack **in, \
@ -232,7 +232,7 @@ ProcDef(stucci);
/* --- */
static void init(bNodeTree *UNUSED(ntree), bNode *node)
static void init(bNodeTree * /*ntree*/, bNode *node)
{
Tex *tex = static_cast<Tex *>(MEM_callocN(sizeof(Tex), "Tex"));
node->storage = tex;

View File

@ -44,7 +44,7 @@ static void rotate(float new_co[3], float a, const float ax[3], const float co[3
new_co[2] = para[2] + perp[2] + cp[2];
}
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void colorfn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
float new_co[3], new_dxt[3], new_dyt[3], a, ax[3];
@ -66,7 +66,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
}
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -19,7 +19,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void colorfn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
float scale[3], new_co[3], new_dxt[3], new_dyt[3];
TexParams np = *p;
@ -39,7 +39,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
tex_input_rgba(out, in[0], &np, thread);
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -65,19 +65,19 @@ static void valuefn_b(float *out, TexParams *p, bNode *node, bNodeStack **in, sh
*out = out[2];
}
static void valuefn_a(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void valuefn_a(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
tex_input_rgba(out, in[0], p, thread);
*out = out[3];
}
static void update(bNodeTree *UNUSED(ntree), bNode *node)
static void update(bNodeTree * /*ntree*/, bNode *node)
{
node_combsep_color_label(&node->outputs, (NodeCombSepColorMode)node->custom1);
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -64,7 +64,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -20,7 +20,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void colorfn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
float offset[3], new_co[3];
TexParams np = *p;
@ -35,7 +35,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
tex_input_rgba(out, in[0], &np, thread);
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -19,7 +19,7 @@ static bNodeSocketTemplate outputs[] = {
{-1, ""},
};
static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
static void normalfn(float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
float new_co[3];
const float *co = p->co;
@ -51,7 +51,7 @@ static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack *
out[2] = val - nor[2];
}
static void exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -29,7 +29,7 @@ static void valtorgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack *
}
static void valtorgb_exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,
@ -38,7 +38,7 @@ static void valtorgb_exec(void *data,
tex_output(node, execdata, in, out[0], &valtorgb_colorfn, static_cast<TexCallData *>(data));
}
static void valtorgb_init(bNodeTree *UNUSED(ntree), bNode *node)
static void valtorgb_init(bNodeTree * /*ntree*/, bNode *node)
{
node->storage = BKE_colorband_add(true);
}
@ -68,7 +68,7 @@ static bNodeSocketTemplate rgbtobw_out[] = {
};
static void rgbtobw_valuefn(
float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
float *out, TexParams *p, bNode * /*node*/, bNodeStack **in, short thread)
{
float cin[4];
tex_input_rgba(cin, in[0], p, thread);
@ -76,7 +76,7 @@ static void rgbtobw_valuefn(
}
static void rgbtobw_exec(void *data,
int UNUSED(thread),
int /*thread*/,
bNode *node,
bNodeExecData *execdata,
bNodeStack **in,

View File

@ -15,11 +15,11 @@ static bNodeSocketTemplate inputs[] = {
};
static void exec(void *data,
int UNUSED(thread),
bNode *UNUSED(node),
bNodeExecData *UNUSED(execdata),
int /*thread*/,
bNode * /*node*/,
bNodeExecData * /*execdata*/,
bNodeStack **in,
bNodeStack **UNUSED(out))
bNodeStack ** /*out*/)
{
TexCallData *cdata = (TexCallData *)data;

View File

@ -973,12 +973,12 @@ static void engine_render_view_layer(Render *re,
/* Callback function for engine_render_create_result to add all render passes to the result. */
static void engine_render_add_result_pass_cb(void *user_data,
struct Scene *UNUSED(scene),
struct Scene * /*scene*/,
struct ViewLayer *view_layer,
const char *name,
int channels,
const char *chanid,
eNodeSocketDatatype UNUSED(type))
eNodeSocketDatatype /*type*/)
{
RenderResult *rr = (RenderResult *)user_data;
RE_create_render_pass(rr, name, channels, chanid, view_layer->name, RR_ALL_VIEWS, false);

View File

@ -831,7 +831,7 @@ static void apply_heights_callback(DerivedMesh *lores_dm,
const int tri_index,
const int lvl,
const float st[2],
float UNUSED(tangmat[3][3]),
float /*tangmat*/[3][3],
const int x,
const int y)
{
@ -910,7 +910,7 @@ static void apply_heights_callback(DerivedMesh *lores_dm,
/* **************** Normal Maps Baker **************** */
static void *init_normal_data(MultiresBakeRender *bkr, ImBuf *UNUSED(ibuf))
static void *init_normal_data(MultiresBakeRender *bkr, ImBuf * /*ibuf*/)
{
MNormalBakeData *normal_data;
DerivedMesh *lodm = bkr->lores_dm;
@ -940,7 +940,7 @@ static void free_normal_data(void *bake_data)
*/
static void apply_tangmat_callback(DerivedMesh *lores_dm,
DerivedMesh *hires_dm,
void *UNUSED(thread_data),
void * /*thread_data*/,
void *bake_data,
ImBuf *ibuf,
const int tri_index,
@ -1107,7 +1107,7 @@ static void create_ao_raytree(MultiresBakeRender *bkr, MAOBakeData *ao_data)
RE_rayobject_done(raytree);
}
static void *init_ao_data(MultiresBakeRender *bkr, ImBuf *UNUSED(ibuf))
static void *init_ao_data(MultiresBakeRender *bkr, ImBuf */*ibuf*/)
{
MAOBakeData *ao_data;
DerivedMesh *lodm = bkr->lores_dm;
@ -1201,13 +1201,13 @@ static int trace_ao_ray(MAOBakeData *ao_data, float ray_start[3], float ray_dire
static void apply_ao_callback(DerivedMesh *lores_dm,
DerivedMesh *hires_dm,
void *UNUSED(thread_data),
void */*thread_data*/,
void *bake_data,
ImBuf *ibuf,
const int tri_index,
const int lvl,
const float st[2],
float UNUSED(tangmat[3][3]),
float /*tangmat[3][3]*/,
const int x,
const int y)
{