diff options
author | Philipp Klaus Krause <pkk@spth.de> | 2020-10-14 03:04:27 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-10-14 03:04:27 +0200 |
commit | 3c99da63be95a3bc6cc881e1ca6c849a921569e1 (patch) | |
tree | e0de48f38530fe8679d05f439f54e4a20b148e9a | |
parent | 160d5e7d9a64a29a52d4821fd0ef2136d7e2102a (diff) | |
download | gnulib-3c99da63be95a3bc6cc881e1ca6c849a921569e1.tar.gz |
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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/test-perror2.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2020-10-13 Philipp Klaus Krause <pkk@spth.de> (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 <bruno@clisp.org> *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); |