From 61c926ac50ecd72cbcca5727b85f11b8f35584e7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 15 Jul 2018 22:15:42 +0200 Subject: [PATCH] compress: Use unsigned constant for definition of mask. Without this, the integer constant is of signed type, which may cause problems when blocksize is 31. --- compress_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compress_filter.c b/compress_filter.c index d26fe233..69a982ef 100644 --- a/compress_filter.c +++ b/compress_filter.c @@ -49,7 +49,7 @@ static int compress_post_select(__a_unused struct sched *s, void *context) int16_t *ip, *op; uint32_t inertia = U32_OPTVAL(INERTIA, fn->lpr); unsigned gain_shift = inertia + U32_OPTVAL(DAMP, fn->lpr), - mask = (1 << U32_OPTVAL(BLOCKSIZE, fn->lpr)) - 1; + mask = (1U << U32_OPTVAL(BLOCKSIZE, fn->lpr)) - 1U; //inplace = false; next_buffer: ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL); -- 2.39.2