[PATCH] erofs-utils: fix `z_erofs_fixup_insize` defined but not used
Gao Xiang
hsiangkao at linux.alibaba.com
Wed May 7 19:55:42 AEST 2025
On 2025/5/7 17:53, Hongbo Li wrote:
>
>
> On 2025/5/7 16:52, Gao Xiang wrote:
>> Fixes: b08e804b1dd1 ("erofs-utils: lib: wrap up zeropadding calculation")
>> Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
>> ---
>> lib/decompress.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/decompress.c b/lib/decompress.c
>> index 3f553a8..1f9daea 100644
>> --- a/lib/decompress.c
>> +++ b/lib/decompress.c
>> @@ -9,9 +9,9 @@
>> #include "erofs/err.h"
>> #include "erofs/print.h"
>> -static unsigned int z_erofs_fixup_insize(const u8 *padbuf, unsigned int padbufsize)
>> +static inline u32 z_erofs_fixup_insize(const u8 *padbuf, u32 padbufsize)
>> {
> How about using macro to constrain it? Like I send in [1].
There are too many macros related to this, you could check..
>
> [1] https://lore.kernel.org/all/20250422123612.261764-5-lihongbo22@huawei.com/
>
> Thanks,
> Hongbo
>
>> - unsigned int inputmargin;
>> + u32 inputmargin;
>> for (inputmargin = 0; inputmargin < padbufsize &&
>> !padbuf[inputmargin]; ++inputmargin);
More information about the Linux-erofs
mailing list