lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f292429f-6b4e-4b2e-db5a-9bf02a3cde0e@cmss.chinamobile.com>
Date:   Wed, 15 Apr 2020 09:22:28 +0800
From:   Tang Bin <tangbin@...s.chinamobile.com>
To:     dsterba@...e.cz, clm@...com, josef@...icpanda.com,
        dsterba@...e.com, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Shengju Zhang <zhangshengju@...s.chinamobile.com>
Subject: Re: [PATCH] btrfs: Fix backref.c selftest compilation warning

Hi David:

On 2020/4/14 23:22, David Sterba wrote:
> On Tue, Apr 14, 2020 at 05:19:31PM +0200, David Sterba wrote:
>> On Sat, Apr 11, 2020 at 11:49:15PM +0800, Tang Bin wrote:
>>> Fix missing braces compilation warning in the ARM
>>> compiler environment:
>>>      fs/btrfs/backref.c: In function ‘is_shared_data_backref’:
>>>      fs/btrfs/backref.c:394:9: warning: missing braces around initializer [-Wmissing-braces]
>>>        struct prelim_ref target = {0};
>>>      fs/btrfs/backref.c:394:9: warning: (near initialization for ‘target.rbnode’) [-Wmissing-braces]
>>>
>>> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
>>> Signed-off-by: Shengju Zhang <zhangshengju@...s.chinamobile.com>
>>> ---
>>>   fs/btrfs/backref.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
>>> index 9c380e7..0cc0257 100644
>>> --- a/fs/btrfs/backref.c
>>> +++ b/fs/btrfs/backref.c
>>> @@ -391,7 +391,7 @@ static int is_shared_data_backref(struct preftrees *preftrees, u64 bytenr)
>>>   	struct rb_node **p = &preftrees->direct.root.rb_root.rb_node;
>>>   	struct rb_node *parent = NULL;
>>>   	struct prelim_ref *ref = NULL;
>>> -	struct prelim_ref target = {0};
>>> +	struct prelim_ref target = {};
>> I wonder why this initialization is a problem while there are about 20
>> other uses of "{0}". The warning is about the embedded rbnode, but why
>> does a more recent compiler not warn about that? Is this a missing fix
>> from the one you use?
>>
>> I don't mind fixing compiler warnings as long as it bothers enough
>> people, eg. we have fixes reported by gcc 7 but I'm hesitant to fix
>> anything older without a good reason.
> This seems to be the bug report
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
> "Bug 53119 - -Wmissing-braces wrongly warns about universal zero
> initializer {0} "

Thank you for your reply. My tool chain is 
"arm-linux-gnueabihf-gcc(Linaro GCC 4.9-2017.01) 4.9.4".

I was trying to do an experiment on the hardware so I compiled it and 
there was a warning. Maybe as Qu Wenruo said possible tools are old?

Thank you for your patience,

Tang Bin







Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ