musl: fix a invalid conversion from 'void*' to 'char*'
PATCH 1/1 musl: fix a invalid conversion from 'void*' to 'char*'
From: Ming Liu <[email protected]>
A compiling warning is observed with gcc -Wconversion option, fixed by casting 'void*' to 'char*'.
Signed-off-by Ming Liu <[email protected]>
--- ...ix-a-invalid-conversion-from-void-to-char.patch | 31 ++++++++++++++++++++++ meta/recipes-core/musl/musl_git.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta/recipes-core/musl/files/0001-fix-a-invalid-conversion-from-void-to-char.patch
meta/recipes-core/musl/files/0001-fix-a-invalid-conversion-from-void-to-char.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 12a3c6d7f53667bbcec585d69e17a5503cc060cb Mon Sep 17 00:00:00 2001 +From: Peter Liu <[email protected]> +Date: Sat, 13 May 2017 06:04:10 +0200 +Subject: [PATCH] fix a invalid conversion from 'void*' to 'char*' + +A compiling warning is observed with gcc -Wconversion option, fixed +by casting 'void*' to 'char*'. + +Upstream-Status: Pending + +Signed-off-by: Peter Liu <[email protected]> +--- + include/string.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/string.h b/include/string.h +index ff9badb..b6b2d82 100644 +--- a/include/string.h ++++ b/include/string.h +@@ -85,7 +85,7 @@ size_t strlcpy (char *, const char *, size_t); + #endif + + #ifdef _GNU_SOURCE +-#define strdupa(x) strcpy(alloca(strlen(x)+1),x) ++#define strdupa(x) strcpy((char*)alloca(strlen(x)+1),x) + int strverscmp (const char *, const char *); + int strcasecmp_l (const char *, const char *, locale_t); + int strncasecmp_l (const char *, const char *, size_t, locale_t); +-- +2.7.4 +
meta/recipes-core/musl/musl_git.bb +1 -0
@@ -11,6 +11,7 @@ PV = "1.1.16+git${SRCPV}" SRC_URI = "git://git.musl-libc.org/musl \ file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ + file://0001-fix-a-invalid-conversion-from-void-to-char.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
2.7.4