From 7fabe1a89903cab4919304faa085ee6eaaec5c9d Mon Sep 17 00:00:00 2001 From: Roberto Vargas Date: Mon, 12 Feb 2018 12:36:17 +0000 Subject: Fix MISRA rule 8.4 in common code Rule 8.4: A compatible declaration shall be visible when an object or function with external linkage is defined. Change-Id: I26e042cb251a6f9590afa1340fdac73e42f23979 Signed-off-by: Roberto Vargas --- lib/extensions/spe/spe.c | 3 ++- lib/stdlib/abort.c | 3 ++- lib/stdlib/exit.c | 3 ++- lib/stdlib/sscanf.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/extensions/spe/spe.c b/lib/extensions/spe/spe.c index 3b297f21a..a1ed7b70b 100644 --- a/lib/extensions/spe/spe.c +++ b/lib/extensions/spe/spe.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,6 +7,7 @@ #include #include #include +#include /* * The assembler does not yet understand the psb csync mnemonic diff --git a/lib/stdlib/abort.c b/lib/stdlib/abort.c index af19ccfa4..65ce4ccaf 100644 --- a/lib/stdlib/abort.c +++ b/lib/stdlib/abort.c @@ -1,10 +1,11 @@ /* - * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include +#include /* * This is a basic implementation. This could be improved. diff --git a/lib/stdlib/exit.c b/lib/stdlib/exit.c index 3d23d7be5..afc3f9343 100644 --- a/lib/stdlib/exit.c +++ b/lib/stdlib/exit.c @@ -1,10 +1,11 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include +#include void exit(int v) { diff --git a/lib/stdlib/sscanf.c b/lib/stdlib/sscanf.c index 674ae79f9..a5876cff3 100644 --- a/lib/stdlib/sscanf.c +++ b/lib/stdlib/sscanf.c @@ -1,9 +1,10 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ +#include #include /* -- cgit v1.2.3