From 3c99da63be95a3bc6cc881e1ca6c849a921569e1 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Krause Date: Wed, 14 Oct 2020 03:04:27 +0200 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ tests/test-perror2.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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); -- 2.39.5