From e22eb23bc232f1236d405110f0d3cb018b9a68b9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 4 Mar 2023 15:19:00 +1100 Subject: [PATCH] Cleanup: match header/source arguments & quiet cppheck warnings --- source/blender/blenkernel/intern/particle_child.c | 10 ++++------ .../gpencil_modifiers/intern/lineart/lineart_chain.c | 4 ++-- source/blender/gpu/GPU_immediate_util.h | 2 +- source/blender/gpu/intern/gpu_immediate_util.c | 4 ++-- source/blender/imbuf/intern/readimage.c | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c index 6cc7dbc70d0..19ad13d3066 100644 --- a/source/blender/blenkernel/intern/particle_child.c +++ b/source/blender/blenkernel/intern/particle_child.c @@ -288,7 +288,7 @@ static bool check_path_length(int k, } void psys_apply_child_modifiers(ParticleThreadContext *ctx, - struct ListBase *modifiers, + struct ListBase *UNUSED(modifiers), ChildParticle *cpa, ParticleTexture *ptex, const float orco[3], @@ -302,15 +302,13 @@ void psys_apply_child_modifiers(ParticleThreadContext *ctx, const bool draw_col_ma = (part->draw_col == PART_DRAW_COL_MAT); const bool use_length_check = !ELEM(part->kink, PART_KINK_SPIRAL); - ParticlePathModifier *mod; + // ParticlePathModifier *mod; ParticleCacheKey *key; int totkeys, k; float max_length; - /* TODO: for the future: use true particle modifiers that work on the whole curve. */ - - (void)modifiers; - (void)mod; + /* TODO: for the future: use true particle modifiers that work on the whole curve. + * `modifiers` & `mod` are unused. */ if (part->kink == PART_KINK_SPIRAL) { do_kink_spiral( diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c index c46b83ea052..880793b8ce6 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c @@ -1051,10 +1051,10 @@ void MOD_lineart_chain_clear_picked_flag(LineartCache *lc) } } -LineartElementLinkNode *lineart_find_matching_eln_obj(ListBase *elns, struct Object *obj) +LineartElementLinkNode *lineart_find_matching_eln_obj(ListBase *elns, struct Object *ob) { LISTBASE_FOREACH (LineartElementLinkNode *, eln, elns) { - if (eln->object_ref == obj) { + if (eln->object_ref == ob) { return eln; } } diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h index d072f57ea27..3f784eb99b3 100644 --- a/source/blender/gpu/GPU_immediate_util.h +++ b/source/blender/gpu/GPU_immediate_util.h @@ -73,7 +73,7 @@ void imm_draw_circle_fill_aspect_2d( */ void imm_draw_circle_wire_3d(uint pos, float x, float y, float radius, int nsegments); void imm_draw_circle_wire_aspect_3d( - uint pos, float x, float y, float radius_x, float radius_y, int nsegments); + uint shdr_pos, float x, float y, float radius_x, float radius_y, int nsegments); void imm_draw_circle_dashed_3d(uint pos, float x, float y, float radius, int nsegments); void imm_draw_circle_fill_3d(uint pos, float x, float y, float radius, int nsegments); void imm_draw_circle_fill_aspect_3d( diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c index 14fb4dbc810..40c0c5efc04 100644 --- a/source/blender/gpu/intern/gpu_immediate_util.c +++ b/source/blender/gpu/intern/gpu_immediate_util.c @@ -383,9 +383,9 @@ void imm_draw_circle_wire_3d(uint pos, float x, float y, float radius, int nsegm } void imm_draw_circle_wire_aspect_3d( - uint shdr_pos, float x, float y, float radius_x, float radius_y, int nsegments) + uint pos, float x, float y, float radius_x, float radius_y, int nsegments) { - imm_draw_circle_3D(GPU_PRIM_LINE_LOOP, shdr_pos, x, y, radius_x, radius_y, nsegments); + imm_draw_circle_3D(GPU_PRIM_LINE_LOOP, pos, x, y, radius_x, radius_y, nsegments); } void imm_draw_circle_dashed_3d(uint pos, float x, float y, float radius, int nsegments) diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c index c9b6a6f6f56..4a662ffba8c 100644 --- a/source/blender/imbuf/intern/readimage.c +++ b/source/blender/imbuf/intern/readimage.c @@ -236,7 +236,7 @@ struct ImBuf *IMB_thumb_load_image(const char *filepath, else { /* Skip images of other types if over 100MB. */ const size_t file_size = BLI_file_size(filepath); - if (file_size != -1 && file_size > THUMB_SIZE_MAX) { + if (file_size != (size_t)-1 && file_size > THUMB_SIZE_MAX) { return NULL; } ibuf = IMB_loadiffname(filepath, flags, colorspace);