* libiberty.h (ASTRDUP): Adjust cast to avoid warning.

From-SVN: r248442
This commit is contained in:
Nathan Sidwell 2017-05-25 00:33:48 +00:00 committed by Nathan Sidwell
parent d0a2c9a28b
commit 2efc367f25
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2017-05-24 Nathan Sidwell <nathan@acm.org>
* libiberty.h (ASTRDUP): Adjust cast to avoid warning.
2017-05-19 Eli Zaretskii <eliz@gnu.org>
* environ.h: Add #ifndef guard.

View File

@ -724,7 +724,7 @@ extern void *C_alloca (size_t) ATTRIBUTE_MALLOC;
# define ASTRDUP(X) \
(__extension__ ({ const char *const libiberty_optr = (X); \
const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
char *const libiberty_nptr = (char *const) alloca (libiberty_len); \
char *const libiberty_nptr = (char *) alloca (libiberty_len); \
(char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); }))
#else
# define alloca(x) C_alloca(x)