From 3e3032cfa044268cee76735823755db274025021 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 13 Jun 2023 18:27:10 -0700 Subject: *: smattering of random small fixes to silence -Wall I thought the build was already using -Wall but that seems to not be the case, maybe got lost somewhere along the line or messed up in configure.ac After forcing a build with -Wall -Werror, these showed up. Fixed up in the obvious way, nothing too scary. --- src/modules/montage/montage.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/modules/montage') diff --git a/src/modules/montage/montage.c b/src/modules/montage/montage.c index 18e1252..c7c2eb0 100644 --- a/src/modules/montage/montage.c +++ b/src/modules/montage/montage.c @@ -158,11 +158,10 @@ static int montage_fragment_tile(const til_fb_fragment_t *fragment, unsigned til */ static int montage_fragmenter(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment) { - montage_context_t *ctxt = (montage_context_t *)context; - float root = sqrtf(((montage_setup_t *)context->setup)->n_tiles); - unsigned tile_width = fragment->frame_width / ceilf(root); /* screens are wide, always give excess to the width */ - unsigned tile_height = fragment->frame_height / rintf(root); /* only give to the height when fraction is >= .5f */ - int ret; + float root = sqrtf(((montage_setup_t *)context->setup)->n_tiles); + unsigned tile_width = fragment->frame_width / ceilf(root); /* screens are wide, always give excess to the width */ + unsigned tile_height = fragment->frame_height / rintf(root); /* only give to the height when fraction is >= .5f */ + int ret; /* XXX: this could all be more clever and make some tiles bigger than others to deal with fractional square roots, * but this is good enough for now considering the simplicity. @@ -252,7 +251,6 @@ static int montage_setup(const til_settings_t *settings, til_setting_t **res_set tiles_settings = (*res_setting)->value_as_nested_settings; { til_setting_t *tile_setting; - const char *layer; for (size_t i = 0; til_settings_get_value_by_idx(tiles_settings, i, &tile_setting); i++) { if (!tile_setting->value_as_nested_settings) { -- cgit v1.2.1