From: Andre Noll Date: Sun, 15 Jul 2018 20:15:42 +0000 (+0200) Subject: compress: Use unsigned constant for definition of mask. X-Git-Tag: v0.6.3~86 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=61c926ac50ecd72cbcca5727b85f11b8f35584e7;p=paraslash.git 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. --- 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);