From: Wolfgang Denk Date: Tue, 26 Apr 2011 00:29:06 +0200 Subject: [U-Boot] [PATCH 2/3] Fix a few gcc warnings. In-Reply-To: <20110425162854.05500a06@schlenkerla.am.freescale.net> References: <20110420201335.BC035152160@gemini.denx.de> <1303633774-22961-3-git-send-email-Joakim.Tjernlund@transmode.se> <20110424221458.90B6CD5269F@gemini.denx.de> <20110425124500.1d6c064f@schlenkerla.am.freescale.net> <20110425144518.5a37bd4c@schlenkerla.am.freescale.net> <20110425212341.829FCD52702@gemini.denx.de> <20110425162854.05500a06@schlenkerla.am.freescale.net> Message-ID: <20110425222906.6C69ED52702@gemini.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 Dear Scott Wood, In message <20110425162854.05500a06@schlenkerla.am.freescale.net> you wrote: > > > I disagree. "printf(foo);" may be suboptimal but there are cases > > where I do not want to see a warning about this. Consider for example > > common/main.c: > > > > 115 # ifdef CONFIG_AUTOBOOT_PROMPT > > 116 printf(CONFIG_AUTOBOOT_PROMPT); > > 117 # endif > > > > Here we provide a way for a user-defined autoboot prompt message. Some > > users may just want to provide a plain string - what's wrong with > > that? [Yes, there are other ways to implement this, but why make it > > more complicated than necessary?] > > It won't warn there, because it all happens in the preprocessor. Why would it not warn if the user just does #define CONFIG_AUTOBOOT_PROMPT "my prompt:" 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 How much net work could a network work, if a network could net work?