* [U-Boot] [PATCH] bedbug_860.c: Fix return type to silence compile warnings.
@ 2010-08-18 18:53 Wolfgang Denk
2010-08-18 22:27 ` [U-Boot] [PATCH V2] bedbug_860.c, bedbug_603e.c: " Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2010-08-18 18:53 UTC (permalink / raw)
To: u-boot
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 the while file 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 <wd@denx.de>
---
arch/powerpc/cpu/mpc8xx/bedbug_860.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/cpu/mpc8xx/bedbug_860.c b/arch/powerpc/cpu/mpc8xx/bedbug_860.c
index 83db035..1a9c0ba 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 */
--
1.7.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH V2] bedbug_860.c, bedbug_603e.c: Fix return type to silence compile warnings.
2010-08-18 18:53 [U-Boot] [PATCH] bedbug_860.c: Fix return type to silence compile warnings Wolfgang Denk
@ 2010-08-18 22:27 ` Wolfgang Denk
2010-09-08 20:03 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2010-08-18 22:27 UTC (permalink / raw)
To: u-boot
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 <wd@denx.de>
---
Changes since V1: fix other occurrences of the same issue, too.
arch/powerpc/cpu/mpc8260/bedbug_603e.c | 12 ++++++++----
arch/powerpc/cpu/mpc8xx/bedbug_860.c | 12 ++++++++----
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/cpu/mpc8260/bedbug_603e.c b/arch/powerpc/cpu/mpc8260/bedbug_603e.c
index 89193a3..92f8957 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 83db035..c0016f7 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@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;
--
1.7.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH V2] bedbug_860.c, bedbug_603e.c: Fix return type to silence compile warnings.
2010-08-18 22:27 ` [U-Boot] [PATCH V2] bedbug_860.c, bedbug_603e.c: " Wolfgang Denk
@ 2010-09-08 20:03 ` Wolfgang Denk
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2010-09-08 20:03 UTC (permalink / raw)
To: u-boot
In message <1282170453-16794-1-git-send-email-wd@denx.de> you wrote:
> 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 <wd@denx.de>
> ---
> Changes since V1: fix other occurrences of the same issue, too.
>
> arch/powerpc/cpu/mpc8260/bedbug_603e.c | 12 ++++++++----
> arch/powerpc/cpu/mpc8xx/bedbug_860.c | 12 ++++++++----
> 2 files changed, 16 insertions(+), 8 deletions(-)
Aplied.
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
What we anticipate seldom occurs; what we least expect generally
happens. - Bengamin Disraeli
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-08 20:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-18 18:53 [U-Boot] [PATCH] bedbug_860.c: Fix return type to silence compile warnings Wolfgang Denk
2010-08-18 22:27 ` [U-Boot] [PATCH V2] bedbug_860.c, bedbug_603e.c: " Wolfgang Denk
2010-09-08 20:03 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.