[U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

Wolfgang Denk wd at denx.de
Thu May 7 20:42:44 CEST 2009


Dear Stefan,

In message <200905071530.43940.sr at denx.de> you wrote:
> 
> On Thursday 07 May 2009, Detlev Zundel wrote:
> > >  int misc_init_r(void)
> > >  {
> > > -	uint pbcr;
> > > -	int size_val = 0;
> > > -	u32 reg;
> > > +	__attribute__((unused)) uint pbcr;
> > > +	__attribute__((unused)) int size_val = 0;
> > > +	__attribute__((unused)) u32 reg;
> >
> > Am I correct to assume that this should shut up warnings for the ifdef
> > case?

Well spotted, thanks.

> I prefer to do it this way instead of encasing the variable declaration into 
> another #ifdef ... #endif section. This is used in many cases in the Linux 
> kernel btw. Here the macro "__maybe_unsed" is defined to 
> "__attribute__((unused))".

I don;t accept this, though.

> So what should I do now? Should I revert to another #ifdef in the variable 
> declaration? Or is the current version ok?

Please use #ifdef.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Conceptual integrity in turn dictates that the  design  must  proceed
from  one  mind,  or  from  a  very small number of agreeing resonant
minds.               - Frederick Brooks Jr., "The Mythical Man Month" 


More information about the U-Boot mailing list