mbox series

[0/2] Fix some -Wmaybe-uninitialized errors

Message ID cover.1693930391.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series Fix some -Wmaybe-uninitialized errors | expand

Message

Josef Bacik Sept. 5, 2023, 4:15 p.m. UTC
Hello,

Jens reported to me two warnings he was seeing with
CONFIG_CC_OPTIMIZE_FOR_SIZE=y set in his .config.  We don't see these errors
without this option, and they're not correct warnings.  However we've had issues
where -Wmaybe-uninitialized would have caught a real bug, so this warning is
generally valuable.  Fix these warnings so we have a clean build.  Thanks,

Josef

Josef Bacik (2):
  btrfs: make sure to initialize start and len in find_free_dev_extent
  btrfs: initialize start_slot in btrfs_log_prealloc_extents

 fs/btrfs/tree-log.c |  2 +-
 fs/btrfs/volumes.c  | 14 ++++++--------
 2 files changed, 7 insertions(+), 9 deletions(-)

Comments

David Sterba Sept. 6, 2023, 4:18 p.m. UTC | #1
On Tue, Sep 05, 2023 at 12:15:22PM -0400, Josef Bacik wrote:
> Hello,
> 
> Jens reported to me two warnings he was seeing with
> CONFIG_CC_OPTIMIZE_FOR_SIZE=y set in his .config.  We don't see these errors
> without this option, and they're not correct warnings.  However we've had issues
> where -Wmaybe-uninitialized would have caught a real bug, so this warning is
> generally valuable.  Fix these warnings so we have a clean build.  Thanks,
> 
> Josef
> 
> Josef Bacik (2):
>   btrfs: make sure to initialize start and len in find_free_dev_extent
>   btrfs: initialize start_slot in btrfs_log_prealloc_extents

Added to misc-next, thanks.