From: liu.ming50@gmail.com
To: musl@lists.openwall.com
Cc: Ming Liu <peter.x.liu@external.atlascopco.com>
Subject: [PATCH] fix a invalid conversion from 'void*' to 'char*'
Date: Sat, 13 May 2017 11:42:01 +0200 [thread overview]
Message-ID: <1494668521-30187-1-git-send-email-liu.ming50@gmail.com> (raw)
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
next reply other threads:[~2017-05-13 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 9:42 liu.ming50 [this message]
2017-05-28 1:46 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1494668521-30187-1-git-send-email-liu.ming50@gmail.com \
--to=liu.ming50@gmail.com \
--cc=musl@lists.openwall.com \
--cc=peter.x.liu@external.atlascopco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).