diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2014-03-13 19:34:47 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2014-03-13 19:34:47 +0100 |
commit | 52684bb3c8ab4b566cb10d20aa06ab388a4a81c7 (patch) | |
tree | 2dc7556dcdb84e7f893b0e8128ed3894d6fe16a3 /libiberty | |
parent | bdc6e1ae29dbca4e3a51f6c06373f0425c239814 (diff) | |
download | gcc-52684bb3c8ab4b566cb10d20aa06ab388a4a81c7.zip gcc-52684bb3c8ab4b566cb10d20aa06ab388a4a81c7.tar.gz gcc-52684bb3c8ab4b566cb10d20aa06ab388a4a81c7.tar.bz2 |
regex.c (bzero): Define without coma expression.
* regex.c (bzero) [!_LIBC]: Define without coma expression.
(regerror): Cast the call to memcpy to (void) to avoid unused
value warnings.
From-SVN: r208553
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/regex.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 0a4496b..9dab384 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2014-03-13 Uros Bizjak <ubizjak@gmail.com> + + * regex.c (bzero) [!_LIBC]: Define without coma expression. + (regerror): Cast the call to memcpy to (void) to avoid unused + value warnings. + 2014-01-28 Thomas Schwinge <thomas@codesourcery.com> * cp-demangle.c (d_demangle_callback): Put an abort call in place, diff --git a/libiberty/regex.c b/libiberty/regex.c index c11f330..cc9acdc 100644 --- a/libiberty/regex.c +++ b/libiberty/regex.c @@ -151,7 +151,7 @@ char *realloc (); # include <string.h> # ifndef bzero # ifndef _LIBC -# define bzero(s, n) (memset (s, '\0', n), (s)) +# define bzero(s, n) memset (s, '\0', n) # else # define bzero(s, n) __bzero (s, n) # endif @@ -8093,12 +8093,12 @@ regerror (int errcode, const regex_t *preg ATTRIBUTE_UNUSED, #if defined HAVE_MEMPCPY || defined _LIBC *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; #else - memcpy (errbuf, msg, errbuf_size - 1); + (void) memcpy (errbuf, msg, errbuf_size - 1); errbuf[errbuf_size - 1] = 0; #endif } else - memcpy (errbuf, msg, msg_size); + (void) memcpy (errbuf, msg, msg_size); } return msg_size; |