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: <FE5FE501300F03CD+be7ce18b-7ed9-4284-89af-33ee03272224@uniontech.com>
Date: Fri, 19 Dec 2025 11:11:05 +0800
From: Qiang Ma <maqianga@...ontech.com>
To: dsterba@...e.cz
Cc: clm@...com, dsterba@...e.com, linux-btrfs@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: Fix -Wmaybe-uninitialized warning


在 2025/12/19 04:37, David Sterba 写道:
> On Thu, Dec 18, 2025 at 04:16:18PM +0800, Qiang Ma wrote:
>> Fix a -Wmaybe-uninitialized warning by initializing
>> the variable to NULL.
>>
>> $ make CFLAGS_tree-log.o=-Wmaybe-uninitialized
>>
>> In file included from fs/btrfs/ctree.h:21,
>>                   from fs/btrfs/tree-log.c:12:
>> fs/btrfs/accessors.h: In function 'replay_one_buffer':
>> fs/btrfs/accessors.h:66:16: warning: 'inode_item' may be used uninitialized [-Wmaybe-uninitialized]
>>     66 |         return btrfs_get_##bits(eb, s, offsetof(type, member));         \
>>        |                ^~~~~~~~~~
>> fs/btrfs/tree-log.c:2803:42: note: 'inode_item' declared here
>>   2803 |                 struct btrfs_inode_item *inode_item;
>>        |                                          ^~~~~~~~~~
>>
>> Warning was found when compiling using loongarch64-gcc 12.3.1.
> We have the -Wmaybe-uninitialized warning enabled per fs/btrfs/
> directory, there are no other known reports fixing the uninitialized
> inode_item so this might be specific to loongarch gcc 12.x. I'll add the
Yes, x86 and arm64 did not report this warning issue.
> patch to for-next as we still want to get all the warnings fixed, thanks.
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ