Skip to contentSkip to conversation

sandbox: fix compiler warning

PATCH New Allen Martin 2 participants 5 messages Jan 22, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sandbox: fix compiler warning

Fix compiler warning about control flow reaching end of non void function.

---
 arch/sandbox/cpu/start.c |    3 +++
 1 file changed, 3 insertions(+)
arch/sandbox/cpu/start.c +3 -0
index 7603bf9..5287fd5 100644
@@ -122,4 +122,7 @@ int main(int argc, char *argv[])
 	 * never return.
 	 */
 	board_init_f(0);
+
+	/* NOTREACHED - board_init_f() does not return */
+	return 0;
 }
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 sandbox: fix compiler warning

Quoted 4 lines · Allen Martin

Fix compiler warning about control flow reaching end of non void function.

Should perhaps mention the commit that adding this warning (e05e5de7 I think)

Quoted 19 lines
---
 arch/sandbox/cpu/start.c |    3 +++
 1 file changed, 3 insertions(+)
arch/sandbox/cpu/start.c +3 -1
index 7603bf9..5287fd5 100644
@@ -122,4 +122,7 @@ int main(int argc, char *argv[])
         * never return.
         */
        board_init_f(0);
+
+       /* NOTREACHED - board_init_f() does not return */
+       return 0;
 }
--

1.7.10.4

#2 lore raw

PATCH 1/1 sandbox: fix compiler warning

Quoted 10 lines · Simon Glass
Quoted 4 lines · Allen Martin

Fix compiler warning about control flow reaching end of non void function.

Should perhaps mention the commit that adding this warning (e05e5de7 I think)

It was this commit:

commit fec79acc864bed049b6beae719ccbf2bbec5403a

Author: Mike Frysinger <[email protected]>
Date:   Wed Oct 26 00:22:14 2011 +0000

sandbox: drop unused return

I'll change the commit messagen and repost and cc Mike as well.

-Allen

Signature · 1 line
nvpublic
#3 lore raw

PATCH 1/1 sandbox: fix compiler warning

Hi Allen,

Quoted 18 lines · Allen Martin
Quoted 10 lines · Simon Glass
Quoted 4 lines · Allen Martin

Fix compiler warning about control flow reaching end of non void function.

Should perhaps mention the commit that adding this warning (e05e5de7 I think)

It was this commit:

commit fec79acc864bed049b6beae719ccbf2bbec5403a

Author: Mike Frysinger <[email protected]>
Date:   Wed Oct 26 00:22:14 2011 +0000
Quoted 7 lines

sandbox: drop unused return

I'll change the commit messagen and repost and cc Mike as well.

Actually I think that Mike's commit was correct at the time, and it was Albert's which changed the no-return behaviour of the function signature in common.h?

Quoted 5 lines

-Allen
--
nvpublic

Regards,
Simon

#4 lore raw

PATCH 1/1 sandbox: fix compiler warning

Quoted 27 lines · Simon Glass

Hi Allen,

Quoted 24 lines · Allen Martin
Quoted 10 lines · Simon Glass
Quoted 4 lines · Allen Martin

Fix compiler warning about control flow reaching end of non void function.

Should perhaps mention the commit that adding this warning (e05e5de7 I think)

It was this commit:

commit fec79acc864bed049b6beae719ccbf2bbec5403a

Author: Mike Frysinger <[email protected]>
Date:   Wed Oct 26 00:22:14 2011 +0000

sandbox: drop unused return

Quoted 5 lines
Quoted 1 line

I'll change the commit messagen and repost and cc Mike as well.

Actually I think that Mike's commit was correct at the time, and it was Albert's which changed the no-return behaviour of the function signature in common.h?

Oh I see, you're right. I'll resend.

-Allen

Signature · 1 line
nvpublic