[U-Boot] [PATCH] drivers/mmc/tegra2_mmc.c: fix GCC 4.6 warning

Tom Warren TWarren at nvidia.com
Wed Mar 28 17:46:08 CEST 2012


Anatolij,

> -----Original Message-----
> From: Anatolij Gustschin [mailto:agust at denx.de]
> Sent: Wednesday, March 28, 2012 6:40 AM
> To: u-boot at lists.denx.de
> Cc: Doug Anderson; Tom Warren
> Subject: [PATCH] drivers/mmc/tegra2_mmc.c: fix GCC 4.6 warning
> 
> Fix:
> tegra2_mmc.c: In function 'mmc_send_cmd':
> tegra2_mmc.c:230:3: warning: 'mask' may be used uninitialized in this
> function [-Wuninitialized]
> 
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> Cc: Doug Anderson <dianders at chromium.org>
> Cc: Tom Warren <twarren at nvidia.com>
> ---
> gcc is wrong here, I think. But I'd like to have a clean build log.
> 
I agree that gcc is being overly paranoid, but thanks for the fix!

Acked-by: Tom Warren <twarren at nvidia.com>

> Anatolij
> 
>  drivers/mmc/tegra2_mmc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/tegra2_mmc.c b/drivers/mmc/tegra2_mmc.c index
> 33cc8fb..fb8a57d 100644
> --- a/drivers/mmc/tegra2_mmc.c
> +++ b/drivers/mmc/tegra2_mmc.c
> @@ -162,7 +162,7 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd
> *cmd,
>  	struct mmc_host *host = (struct mmc_host *)mmc->priv;
>  	int flags, i;
>  	int result;
> -	unsigned int mask;
> +	unsigned int mask = 0;
>  	unsigned int retry = 0x100000;
>  	debug(" mmc_send_cmd called\n");
> 
> --
> 1.7.7.6
-- 
nvpublic


More information about the U-Boot mailing list