From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 23 Jan 2013 07:46:03 +0100 Subject: [U-Boot] [PATCH v3] sandbox: fix compiler warning In-Reply-To: <1358896281-32106-1-git-send-email-amartin@nvidia.com> References: <1358896281-32106-1-git-send-email-amartin@nvidia.com> Message-ID: <20130123074603.2949fa47@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Allen, On Tue, 22 Jan 2013 15:11:21 -0800, Allen Martin 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 > Acked-by: Simon Glass > --- > 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.