Cleanup: quiet unused but set warnings with CLANG

This commit is contained in:
Campbell Barton 2023-03-28 12:14:16 +11:00
parent bbcfdb844c
commit 47e065f165
9 changed files with 11 additions and 0 deletions

@ -1294,6 +1294,7 @@ void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *re
BLO_library_link_end(mainl, &blo_handle, lapp_context->params);
link_append_context_library_blohandle_release(lapp_context, lib_context);
}
(void)item_idx; /* Quiet set-but-unused warning (may be removed). */
/* Instantiate newly linked IDs as needed, if no append is scheduled. */
if ((lapp_context->params->flag & FILE_LINK) != 0 &&
@ -1688,6 +1689,7 @@ void BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context,
/* Should not be needed, all tagged IDs should have been deleted above, just 'in case'. */
BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
}
(void)item_idx; /* Quiet set-but-unused warning (may be removed). */
/* Some datablocks can get reloaded/replaced 'silently' because they are not linkable
* (shape keys e.g.), so we need another loop here to clear old ones if possible. */

@ -2102,6 +2102,7 @@ void BKE_gpencil_stroke_simplify_adaptive(bGPdata *gpd, bGPDstroke *gps, float e
le = ls + 1;
}
}
(void)totmarked; /* Quiet set-but-unused warning (may be removed). */
/* adding points marked */
MDeformVert *old_dvert = nullptr;

@ -3121,6 +3121,7 @@ static void tracking_dopesheet_channels_segments_calc(MovieTrackingDopesheetChan
}
channel->tot_segment++;
(void)len; /* Quiet set-but-unused warning (may be removed). */
}
i++;

@ -400,6 +400,7 @@ static GPUIndexBuf *lattice_batch_cache_get_edges(LatticeRenderData *rdata,
else {
BLI_assert(edge_len_real == edge_len);
}
UNUSED_VARS_NDEBUG(edge_len_real);
cache->edges = GPU_indexbuf_build(&elb);
}

@ -1667,6 +1667,7 @@ static void harmonic_coordinates_bind(MeshDeformModifierData *mmd, MeshDeformBin
totinside++;
}
}
(void)totinside; /* Quiet set-but-unused warning (may be removed). */
/* free temporary MDefBoundIsects */
BLI_memarena_free(mdb->memarena);

@ -167,6 +167,7 @@ static int mask_shape_key_feather_reset_exec(bContext *C, wmOperator *UNUSED(op)
i_abs++;
}
}
(void)i_abs; /* Quiet set-but-unused warning (may be removed). */
}
else {
// printf("%s: skipping\n", __func__);
@ -324,6 +325,7 @@ static int mask_shape_key_rekey_exec(bContext *C, wmOperator *op)
i_abs++;
}
}
(void)i_abs; /* Quiet set-but-unused warning (may be removed). */
BKE_mask_layer_shape_free(mask_layer_shape_tmp);
}

@ -1091,6 +1091,7 @@ static void cursor_draw_tiling_preview(const uint gpuattr,
}
}
}
(void)tile_pass; /* Quiet set-but-unused warning (may be removed). */
}
static void cursor_draw_point_with_symmetry(const uint gpuattr,

@ -4162,6 +4162,7 @@ void uv_parametrizer_pack(ParamHandle *handle, float margin, bool do_rotate, boo
unpacked++;
continue;
}
(void)unpacked; /* Quiet set-but-unused warning (may be removed). */
geometry::PackIsland *pack_island = new geometry::PackIsland();
pack_island->caller_index = i;

@ -437,6 +437,7 @@ static SeqCacheKey *seq_cache_get_item_for_removal(Scene *scene)
rkey = key;
}
}
(void)total_count; /* Quiet set-but-unused warning (may be removed). */
finalkey = seq_cache_choose_key(scene, lkey, rkey);