On Tue, Nov 06, 2012 at 07:57:47PM +0100, Stefan Behrens wrote:
> On 11/06/2012 19:17, Bart Noordervliet wrote:
> >Great new feature Stefan, thanks a lot! Going to give it a spin right
> >away. While compiling I got this (probably superfluous) error that you
> >might want to prevent:
> >
> >fs/btrfs/dev-replace.c: In function ‘btrfs_dev_replace_start’:
> >fs/btrfs/dev-replace.c:344:5: warning: ‘ret’ may be used uninitialized
> >in this function [-Wmaybe-uninitialized]
> >
> >Regards,
> >
> >Bart
> >
> 
> Yes, this happens on 32 bit builds, not on 64 bit builds. If you
> look at the source code, the compiler is obviously wrong (or I am
> blind).
> 
>         ret = btrfs_dev_replace_find_srcdev(root, args->start.srcdevid,
>                                             args->start.srcdev_name,
>                                             &src_device);
>         mutex_unlock(&fs_info->volume_mutex);
>         if (ret) {  <-- this is line 344
> 
> But thanks for the feedback anyway!

   This usually means that somewhere in the call tree under
btrfs_dev_replace_find_srcdev(), there's a way that the function can
return without returning a value, or returning an unintialised
variable. Not quite sure why it's only on 32 bits, though.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
     --- Computer Science is not about computers,  any more than ---     
                     astronomy is about telescopes.                      

Attachment: signature.asc
Description: Digital signature

Reply via email to