Skip to content

Commit 1271c1f

Browse files
committed
[[ Cleanup ]] Prevent a large number of unused variable warnings.
In the advanced_imaging_combiner() template function, two alpha channel variables were being set while decomposing colour information but were not being used. Since it makes sense to decompose all channels, even if not all channels are needed, add ATTRIBUTE_UNUSED. This prevents a set-but-unused warning from being emitted for every single instance of the template.
1 parent 3ef5f1b commit 1271c1f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

engine/src/combiners.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ template<int x_combiner, bool x_dst_alpha, bool x_src_alpha> INLINE uint32_t adv
655655
uint16_t t_dst_alpha_src_red, t_dst_alpha_src_green, t_dst_alpha_src_blue, t_dst_alpha_src_alpha, t_dst_alpha_dst_alpha;
656656
uint16_t t_dst_alpha_dst_red, t_dst_alpha_dst_green, t_dst_alpha_dst_blue;
657657
uint16_t t_src_alpha_dst_red, t_src_alpha_dst_green, t_src_alpha_dst_blue, t_src_alpha_dst_alpha;
658-
uint16_t t_inv_dst_alpha_src_red, t_inv_dst_alpha_src_green, t_inv_dst_alpha_src_blue, t_inv_dst_alpha_src_alpha;
659-
uint16_t t_inv_src_alpha_dst_red, t_inv_src_alpha_dst_green, t_inv_src_alpha_dst_blue, t_inv_src_alpha_dst_alpha;
658+
uint16_t t_inv_dst_alpha_src_red, t_inv_dst_alpha_src_green, t_inv_dst_alpha_src_blue, t_inv_dst_alpha_src_alpha ATTRIBUTE_UNUSED;
659+
uint16_t t_inv_src_alpha_dst_red, t_inv_src_alpha_dst_green, t_inv_src_alpha_dst_blue, t_inv_src_alpha_dst_alpha ATTRIBUTE_UNUSED;
660660
uint32_t t_dst_alpha_dst_alpha_src_alpha;
661661
uint8_t t_red, t_green, t_blue, t_alpha;
662662

0 commit comments

Comments
 (0)