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

Sascha Hauer s.hauer at pengutronix.de
Wed Oct 2 04:27:57 EDT 2013


On Tue, Oct 01, 2013 at 03:22:50PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 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

Ok, changed this.

Sascha

> >  	}
> >  
> >  	barebox_set_model("ARM Vexpress");
> > -- 
> > 1.8.4.rc3
> > 
> > 
> > _______________________________________________
> > barebox mailing list
> > barebox at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list