Cleanup: quiet some array-bounds warnings with GCC 15
Warnings remain but suppression is not as simple, see: !146150.
This commit is contained in:
@@ -133,7 +133,14 @@ class Array {
|
||||
{
|
||||
BLI_assert(size >= 0);
|
||||
data_ = this->get_buffer_for_size(size);
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#endif
|
||||
uninitialized_fill_n(data_, size, value);
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
size_ = size;
|
||||
}
|
||||
|
||||
|
||||
@@ -1101,7 +1101,7 @@ static void text_selection_draw(const bContext *C, const Strip *strip, uint pos)
|
||||
const blender::float2 view_offs{-scene->r.xsch / 2.0f, -scene->r.ysch / 2.0f};
|
||||
const float view_aspect = scene->r.xasp / scene->r.yasp;
|
||||
blender::float3x3 transform_mat = seq::image_transform_matrix_get(scene, strip);
|
||||
blender::float4x2 selection_quad{
|
||||
blender::float2 selection_quad[4] = {
|
||||
{character_start.position.x, line_y},
|
||||
{character_start.position.x, line_y + text->line_height},
|
||||
{character_end.position.x + character_end.advance_x, line_y + text->line_height},
|
||||
@@ -1160,7 +1160,7 @@ static void text_edit_draw_cursor(const bContext *C, const Strip *strip, uint po
|
||||
|
||||
cursor_coords = coords_region_view_align(UI_view2d_fromcontext(C), cursor_coords);
|
||||
|
||||
blender::float4x2 cursor_quad{
|
||||
blender::float2 cursor_quad[4] = {
|
||||
{cursor_coords.x, cursor_coords.y},
|
||||
{cursor_coords.x, cursor_coords.y + text->line_height},
|
||||
{cursor_coords.x + cursor_width, cursor_coords.y + text->line_height},
|
||||
|
||||
@@ -197,7 +197,8 @@ static Mesh *modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh
|
||||
int totvert, faces_num, totloop, totedge;
|
||||
int maxvert, maxpoly, maxloop, maxedge, part_end = 0, part_start;
|
||||
int k, p, p_skip;
|
||||
short track = ctx->object->trackflag % 3, trackneg, axis = pimd->axis;
|
||||
const uint track = uint(ctx->object->trackflag) % 3;
|
||||
short trackneg, axis = pimd->axis;
|
||||
float max_co = 0.0, min_co = 0.0, temp_co[3];
|
||||
float *size = nullptr;
|
||||
float spacemat[4][4];
|
||||
|
||||
Reference in New Issue
Block a user