From: Bruno Haible Date: Sat, 19 Nov 2016 11:50:28 +0000 (+0100) Subject: strerror: Make it compile in C++ mode. X-Git-Tag: v1.0~6550 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=33a0497171b1329aa98af53722cdfadf3cdc9828;p=gnulib.git strerror: Make it compile in C++ mode. * lib/strerror.c (strerror): Ignore the return value of memcpy(). --- diff --git a/ChangeLog b/ChangeLog index c0851b2bdd..c7bf5abc0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-11-19 Bruno Haible + + strerror: Make it compile in C++ mode. + * lib/strerror.c (strerror): Ignore the return value of memcpy(). + 2016-11-15 Pedro Alves sys_time: add gnulib::timeval for C++ diff --git a/lib/strerror.c b/lib/strerror.c index 45c763391c..8fff3bd6a8 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -66,5 +66,6 @@ strerror (int n) if (sizeof buf <= len) abort (); - return memcpy (buf, msg, len + 1); + memcpy (buf, msg, len + 1); + return buf; }