[PATCH 5/6] ARM: vexpress: Fix compiler warning

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Oct 1 09:22:50 EDT 2013


On 08:22 Tue 01 Oct     , Sascha Hauer wrote:
> Fixes:
> 
> arch/arm/boards/vexpress/init.c: In function 'vexpress_core_init':
> arch/arm/boards/vexpress/init.c:139:22: warning: 'hostname' may be used uninitialized in this function [-Wmaybe-uninitialized]
> 
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> ---
>  arch/arm/boards/vexpress/init.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c
> index 48bc11e..5358be3 100644
> --- a/arch/arm/boards/vexpress/init.c
> +++ b/arch/arm/boards/vexpress/init.c
> @@ -133,6 +133,8 @@ static int vexpress_core_init(void)
>  			hostname = "vexpress-a9";
>  		else if (cpu_is_cortex_a15())
>  			hostname = "vexpress-a15";
> +		else
> +			hostname = "vexpress-unknown";

so set hostname by default not on else
>  	}
>  
>  	barebox_set_model("ARM Vexpress");
> -- 
> 1.8.4.rc3
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox



More information about the barebox mailing list