]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: suppress false positive last_block warning
authorGao Xiang <hsiangkao@redhat.com>
Thu, 28 May 2020 08:48:44 +0000 (04:48 -0400)
committerGao Xiang <hsiangkao@redhat.com>
Fri, 29 May 2020 10:58:13 +0000 (18:58 +0800)
commitae609ee677931ca4a4f19b5eb7bf5f920dd1c197
tree88f945f684ff341d135f88ceb4f6fd9312f1dbf4
parent3c59a6d9c45bd4a260591924175f7b306245a1ad
erofs: suppress false positive last_block warning

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@linux-foundation.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Link: https://lore.kernel.org/r/20200528084844.23359-1-hsiangkao@redhat.com
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
fs/erofs/data.c