[PATCH] erofs: suppress false positive last_block warning

Chao Yu yuchao0 at huawei.com
Thu May 28 19:25:05 AEST 2020


On 2020/5/28 16:48, Gao Xiang wrote:
> As Andrew mentioned, some rare specific gcc versions could report
> last_block uninitialized warning. Actually last_block doesn't need
> to be uninitialized first from its implementation due to bio == NULL
> condition. After a bio is allocated, last_block will be assigned
> then.
> 
> The detailed analysis is in this thread [1]. So let's silence those
> confusing gccs simply.
> 
> [1] https://lore.kernel.org/r/20200421072839.GA13867@hsiangkao-HP-ZHAN-66-Pro-G1
> 
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Signed-off-by: Gao Xiang <hsiangkao at redhat.com>

Reviewed-by: Chao Yu <yuchao0 at huawei.com>

Thanks,


More information about the Linux-erofs mailing list