Re: [PATCH] fs: tree-checker: fix missing brace warning for old compilers

2020-10-03 Thread Nikolay Borisov
On 3.10.20 г. 3:11 ч., Pujin Shi wrote: > For older versions of gcc, the array = {0}; will cause warnings: > > fs/btrfs/tree-checker.c: In function 'check_root_item': > fs/btrfs/tree-checker.c:1038:9: warning: missing braces around initializer > [-Wmissing-braces] > struct btrfs_root_item ri

Re: [PATCH] fs: tree-checker: fix missing brace warning for old compilers

2020-10-02 Thread Su Yue
On Sat 03 Oct 2020 at 08:11, Pujin Shi wrote: For older versions of gcc, the array = {0}; will cause warnings: So what's the version number of the gcc? "struct foo = { 0 }" should be correct. May be the compiler issue[1] related? 1: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119

[PATCH] fs: tree-checker: fix missing brace warning for old compilers

2020-10-02 Thread Pujin Shi
For older versions of gcc, the array = {0}; will cause warnings: fs/btrfs/tree-checker.c: In function 'check_root_item': fs/btrfs/tree-checker.c:1038:9: warning: missing braces around initializer [-Wmissing-braces] struct btrfs_root_item ri = { 0 }; ^ fs/btrfs/tree-checker.c:1038:9: wa