aboutsummaryrefslogtreecommitdiff
path: root/libiberty/regex.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-13 18:34:47 +0000
committerTom Tromey <tromey@redhat.com>2014-05-08 10:18:29 -0600
commit10fe779dd24e3809070b5b634214a9c7d8b11814 (patch)
tree74064ccc651fed1b71ea213b7f99ab15ff93e15f /libiberty/regex.c
parentabca8d871a6f8f4d7f9762133e1af637869da1bb (diff)
downloadgdb-10fe779dd24e3809070b5b634214a9c7d8b11814.zip
gdb-10fe779dd24e3809070b5b634214a9c7d8b11814.tar.gz
gdb-10fe779dd24e3809070b5b634214a9c7d8b11814.tar.bz2
* regex.c (bzero) [!_LIBC]: Define without coma expression. (regerror): Cast the call to memcpy to (void) to avoid unused value warnings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208553 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/regex.c')
-rw-r--r--libiberty/regex.c6
1 files changed, 3 insertions, 3 deletions
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;