lib/radix-tree.c: fix uninitialized variable compilation warning
authorRong Tao <rongtao@cestc.cn>
Wed, 9 Nov 2022 14:34:25 +0000 (22:34 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 1 Dec 2022 00:13:17 +0000 (16:13 -0800)
commitfc0e7387926d7704ba54ff0d20db80051392583d
tree0ae4922e89177b98de00e506590207888fbf20bf
parent08fc35f31b9e14cb4e8ba5bf43f824559dbdbe88
lib/radix-tree.c: fix uninitialized variable compilation warning

We need to set an initial value for offset to eliminate compilation
warning.

How to reproduce warning:

$ make -C tools/testing/radix-tree
radix-tree.c: In function `radix_tree_tag_clear':
radix-tree.c:1046:17: warning: `offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
 1046 |                 node_tag_clear(root, parent, tag, offset);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link: https://lkml.kernel.org/r/tencent_DF74099967595DCEA93CBDC28D062026180A@qq.com
Signed-off-by: Rong Tao <rongtao@cestc.cn>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/radix-tree.c