Re: [PATCH] MD RAID10: Fix compiler warning.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 26 Jun 2012 03:40:13 -0500 Jonathan Brassow <jbrassow@xxxxxxxxxx>
wrote:

> MD RAID10:  Fix compiler warning.
> 
> Initialize variable to prevent compiler warning.
> 
> Signed-off-by: Jonathan Brassow <jbrassow@xxxxxxxxxx>
> 
> Index: linux-upstream/drivers/md/raid10.c
> ===================================================================
> --- linux-upstream.orig/drivers/md/raid10.c
> +++ linux-upstream/drivers/md/raid10.c
> @@ -717,7 +717,7 @@ static struct md_rdev *read_balance(stru
>  	int sectors = r10_bio->sectors;
>  	int best_good_sectors;
>  	sector_t new_distance, best_dist;
> -	struct md_rdev *rdev, *best_rdev;
> +	struct md_rdev *best_rdev, *rdev = NULL;
>  	int do_balance;
>  	int best_slot;
>  	struct geom *geo = &conf->geo;
> 

Applied, thanks.
I'm fairly sure it is a bogus warning, but initializing to NULL won't hurt.

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux