From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 3 Oct 2011 11:22:21 -0500 Subject: [U-Boot] [PATCH 2/5] GCC4,6: Squash warning in cmd_nand.c In-Reply-To: <201109301214.46070.marek.vasut@gmail.com> References: <1317377606-9830-1-git-send-email-marek.vasut@gmail.com> <1317377606-9830-2-git-send-email-marek.vasut@gmail.com> <201109301214.46070.marek.vasut@gmail.com> Message-ID: <4E89E13D.2080006@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/30/2011 05:14 AM, Marek Vasut wrote: > On Friday, September 30, 2011 12:13:23 PM Marek Vasut wrote: >> cmd_nand.c: In function ?do_nand?: >> cmd_nand.c:490:7: warning: variable ?chip? set but not used >> [-Wunused-but-set-variable] >> cmd_nand.c:489:7: warning: variable ?part? set but not used >> [-Wunused-but-set-variable] >> >> Signed-off-by: Marek Vasut >> Cc: Scott Wood >> --- >> common/cmd_nand.c | 4 ---- >> 1 files changed, 0 insertions(+), 4 deletions(-) >> > > This even looks like .part and .chip has no effect at all ... am I right ? They affect error checking. Beyond that, the code can tell what to do from the number of arguments. The idea was that accidentally leaving out an argument (such as by a misspelled $varaible) shouldn't end up erasing more than you expected. -Scott