From: Wolfgang Denk Date: Wed, 18 Aug 2010 22:27:33 +0000 (+0200) Subject: bedbug_860.c, bedbug_603e.c: Fix return type to silence compile warnings. X-Git-Tag: v2010.09-rc1~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=40e74c852b76accfe27d832f23ea3020352bc120;p=oweals%2Fu-boot.git bedbug_860.c, bedbug_603e.c: Fix return type to silence compile warnings. commit 47e26b1b "cmd_usage(): simplify return code handling" caused the following compile warnings: bedbug_860.c: In function 'bedbug860_do_break': bedbug_860.c:73: warning: 'return' with a value, in function returning void bedbug_860.c:121: warning: 'return' with a value, in function returning void Fix the return type. Actually these files could need some cleanup - commands should return proper error codes, and there are coding style issues. => To be fixed later. Signed-off-by: Wolfgang Denk --- diff --git a/arch/powerpc/cpu/mpc8260/bedbug_603e.c b/arch/powerpc/cpu/mpc8260/bedbug_603e.c index 89193a348e..92f89578b0 100644 --- a/arch/powerpc/cpu/mpc8260/bedbug_603e.c +++ b/arch/powerpc/cpu/mpc8260/bedbug_603e.c @@ -70,8 +70,10 @@ void bedbug603e_do_break (cmd_tbl_t *cmdtp, int flag, int argc, int which_bp; /* Breakpoint number */ /* -------------------------------------------------- */ - if (argc < 2) - return cmd_usage(cmdtp); + if (argc < 2) { + cmd_usage(cmdtp); + return; + } /* Turn off a breakpoint */ @@ -114,8 +116,10 @@ void bedbug603e_do_break (cmd_tbl_t *cmdtp, int flag, int argc, if(!(( isdigit( argv[ 1 ][ 0 ] )) || (( argv[ 1 ][ 0 ] >= 'a' ) && ( argv[ 1 ][ 0 ] <= 'f' )) || - (( argv[ 1 ][ 0 ] >= 'A' ) && ( argv[ 1 ][ 0 ] <= 'F' )))) - return cmd_usage(cmdtp); + (( argv[ 1 ][ 0 ] >= 'A' ) && ( argv[ 1 ][ 0 ] <= 'F' )))) { + cmd_usage(cmdtp); + return; + } addr = simple_strtoul( argv[ 1 ], NULL, 16 ); diff --git a/arch/powerpc/cpu/mpc8xx/bedbug_860.c b/arch/powerpc/cpu/mpc8xx/bedbug_860.c index 83db035ab5..c0016f72ff 100644 --- a/arch/powerpc/cpu/mpc8xx/bedbug_860.c +++ b/arch/powerpc/cpu/mpc8xx/bedbug_860.c @@ -69,8 +69,10 @@ void bedbug860_do_break (cmd_tbl_t *cmdtp, int flag, int argc, int which_bp; /* Breakpoint number */ /* -------------------------------------------------- */ - if (argc < 2) - return cmd_usage(cmdtp); + if (argc < 2) { + cmd_usage(cmdtp); + return; + } /* Turn off a breakpoint */ @@ -117,8 +119,10 @@ void bedbug860_do_break (cmd_tbl_t *cmdtp, int flag, int argc, /* Set a breakpoint at the address */ - if( !isdigit( argv[ 1 ][ 0 ])) - return cmd_usage(cmdtp); + if( !isdigit( argv[ 1 ][ 0 ])) { + cmd_usage(cmdtp); + return; + } addr = simple_strtoul( argv[ 1 ], NULL, 16 ) & 0xfffffffc;