]> Savannah Git Hosting - gnulib.git/commitdiff
Don't declare an intention to modify the return value of strerror.
authorPhilipp Klaus Krause <pkk@spth.de>
Wed, 14 Oct 2020 01:04:27 +0000 (03:04 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 14 Oct 2020 01:04:27 +0000 (03:04 +0200)
* tests/test-perror2.c (main): Assign the return value of strerror to a
'const char *' variable.

ChangeLog
tests/test-perror2.c

index db803603291194567581c66e7c1dfce1e970763b..e04cab531e192649bee6e8ac6c0a68df4e7e1a75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index c6214dd25c8c351c5b428503c40e4d9559099922..8467b4806f3f4e8d62750b1a6df4d6009692ca86 100644 (file)
@@ -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);