From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 7 May 2009 15:30:43 +0200 Subject: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target In-Reply-To: References: <1241535678-24897-1-git-send-email-sr@denx.de> Message-ID: <200905071530.43940.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Detlev, 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? Yes. > If so, it still seems to be a somewhat rude way to do it. How > long will it take the gcc maintainers to produce a "warning: unused > variable is used" warning? ;) 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))". So what should I do now? Should I revert to another #ifdef in the variable declaration? Or is the current version ok? Thanks. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================