From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] sandbox: fix compiler warning
Date: Wed, 23 Jan 2013 07:46:03 +0100 [thread overview]
Message-ID: <20130123074603.2949fa47@lilith> (raw)
In-Reply-To: <1358896281-32106-1-git-send-email-amartin@nvidia.com>
Hi Allen,
On Tue, 22 Jan 2013 15:11:21 -0800, Allen Martin <amartin@nvidia.com>
wrote:
> Add back return statement to fix compiler warning about control flow
> reaching end of non void function that was introduced with:
>
> e05e5de arm: move C runtime setup code in crt0.S
>
> Signed-off-by: Allen Martin <amartin@nvidia.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
> arch/sandbox/cpu/start.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
> index 7603bf9..5287fd5 100644
> --- a/arch/sandbox/cpu/start.c
> +++ b/arch/sandbox/cpu/start.c
> @@ -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;
> }
Shouldn't the function be given '__attribute__((noreturn))' rather than
adding a non-executed 'return 0' to it?
Amicalement,
--
Albert.
next prev parent reply other threads:[~2013-01-23 6:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 23:11 [U-Boot] [PATCH v3] sandbox: fix compiler warning Allen Martin
2013-01-23 6:46 ` Albert ARIBAUD [this message]
2013-01-23 21:05 ` Allen Martin
2013-01-24 12:45 ` Albert ARIBAUD
2013-02-16 0:06 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130123074603.2949fa47@lilith \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox