Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 13 May 2017 11:42:01 +0200
From: liu.ming50@...il.com
To: musl@...ts.openwall.com
Cc: Ming Liu <peter.x.liu@...ernal.atlascopco.com>
Subject: [PATCH] fix a invalid conversion from 'void*' to 'char*'

From: Ming Liu <peter.x.liu@...ernal.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@...ernal.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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.