[U-Boot] [PATCH 2/5] GCC4,6: Squash warning in cmd_nand.c

Scott Wood scottwood at freescale.com
Mon Oct 3 18:22:21 CEST 2011


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 <marek.vasut at gmail.com>
>> Cc: Scott Wood <scottwood at freescale.com>
>> ---
>>  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



More information about the U-Boot mailing list