From: Philipp Klaus Krause Date: Wed, 14 Oct 2020 01:04:27 +0000 (+0200) Subject: Don't declare an intention to modify the return value of strerror. X-Git-Tag: v1.0~3568 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3c99da63be95a3bc6cc881e1ca6c849a921569e1;p=gnulib.git Don't declare an intention to modify the return value of strerror. * tests/test-perror2.c (main): Assign the return value of strerror to a 'const char *' variable. --- diff --git a/ChangeLog b/ChangeLog index db80360329..e04cab531e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-10-13 Philipp Klaus Krause (tiny change) + + Don't declare an intention to modify the return value of strerror. + * tests/test-perror2.c (main): Assign the return value of strerror to a + 'const char *' variable. + 2020-10-11 Bruno Haible *printf: Avoid "expanded before it was required" warning. diff --git a/tests/test-perror2.c b/tests/test-perror2.c index c6214dd25c..8467b4806f 100644 --- a/tests/test-perror2.c +++ b/tests/test-perror2.c @@ -94,7 +94,7 @@ main (void) for (i = 0; i < SIZEOF (errs); i++) { char buf[256]; - char *err = strerror (errs[i]); + const char *err = strerror (errs[i]); ASSERT (err); ASSERT (strlen (err) < sizeof buf);