summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorAmbroise Vincent <ambroise.vincent@arm.com>2019-02-13 15:58:00 +0000
committerAmbroise Vincent <ambroise.vincent@arm.com>2019-04-01 10:43:42 +0100
commit609e053caabf0807a71243eec11f49120eaaab61 (patch)
tree5f0a7641dcd9c8450f0f1a53083daf714c3c55dc /lib/libc
parentee80da114b9da8bd48e82ad0187c6534a2f11e71 (diff)
Remove several warnings reported with W=1
Improved support for W=1 compilation flag by solving missing-prototypes and old-style-definition warnings. The libraries are compiling with warnings (which turn into errors with the Werror flag). Outside of libraries, some warnings cannot be fixed without heavy structural changes. Change-Id: I1668cf99123ac4195c2a6a1d48945f7a64c67f16 Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/memchr.c3
-rw-r--r--lib/libc/memcmp.c3
-rw-r--r--lib/libc/memcpy.c3
-rw-r--r--lib/libc/memset.c3
4 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/memchr.c b/lib/libc/memchr.c
index 2eba47c9..0fe05358 100644
--- a/lib/libc/memchr.c
+++ b/lib/libc/memchr.c
@@ -1,10 +1,11 @@
/*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
+#include <string.h>
void *memchr(const void *src, int c, size_t len)
{
diff --git a/lib/libc/memcmp.c b/lib/libc/memcmp.c
index a4c798b0..cd5f0df0 100644
--- a/lib/libc/memcmp.c
+++ b/lib/libc/memcmp.c
@@ -1,10 +1,11 @@
/*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
+#include <string.h>
int memcmp(const void *s1, const void *s2, size_t len)
{
diff --git a/lib/libc/memcpy.c b/lib/libc/memcpy.c
index fc0c9fe8..158df9b7 100644
--- a/lib/libc/memcpy.c
+++ b/lib/libc/memcpy.c
@@ -1,10 +1,11 @@
/*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
+#include <string.h>
void *memcpy(void *dst, const void *src, size_t len)
{
diff --git a/lib/libc/memset.c b/lib/libc/memset.c
index 03aa8096..d8007d8e 100644
--- a/lib/libc/memset.c
+++ b/lib/libc/memset.c
@@ -1,10 +1,11 @@
/*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
+#include <string.h>
void *memset(void *dst, int val, size_t count)
{