From: Mike Frysinger Date: Mon, 5 Mar 2012 23:39:43 -0500 Subject: [U-Boot] [PATCH v5 5/9] Don't include standard parser if hush is used In-Reply-To: <1329285566-30386-6-git-send-email-sjg@chromium.org> References: <1329285566-30386-1-git-send-email-sjg@chromium.org> <1329285566-30386-6-git-send-email-sjg@chromium.org> Message-ID: <201203052339.45005.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 15 February 2012 00:59:22 Simon Glass wrote: > This saves about 1KB of code space on ARM with CONFIG_SYS_HUSH_PARSER > defined. > > --- a/common/main.c > +++ b/common/main.c > @@ -1132,6 +1132,7 @@ int parse_line (char *line, char *argv[]) > > /************************************************************************* > ***/ > > +#ifndef CONFIG_SYS_HUSH_PARSER > static void process_macros (const char *input, char *output) > { > char c, prev; > @@ -1382,6 +1383,7 @@ static int builtin_run_command(const char *cmd, int > flag) > > return rc ? rc : repeatable; > } > +#endif not sure why this is needed ... this wraps two static funcs, so gcc should be able to see that they're unused and automatically delete them shouldn't it ? why do you need the explicit ifdef ? -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: