mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH] fix a invalid conversion from 'void*' to 'char*'
@ 2017-05-13  9:42 liu.ming50
  2017-05-28  1:46 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: liu.ming50 @ 2017-05-13  9:42 UTC (permalink / raw)
  To: musl; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

A compiling warning is observed with gcc -Wconversion option, fixed
by casting 'void*' to 'char*'.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-28  1:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-13  9:42 [PATCH] fix a invalid conversion from 'void*' to 'char*' liu.ming50
2017-05-28  1:46 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).