summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-03-20 20:35:44 +0100
committerJim Meyering <meyering@redhat.com>2012-03-20 20:35:44 +0100
commit880a2f6db9e37ef84347a47b15f88bef741c03da (patch)
tree20ebb4c519aaf5d539f0cd8db90e1df5a7155120
parenteb7136185a852d5769d64af3585115632b41517c (diff)
downloadgnulib-880a2f6db9e37ef84347a47b15f88bef741c03da.tar.gz
tests: avoid gcc warnings about argv vs. const initializers
* tests/test-posix_spawn1.c (main): Cast to "(char *)" to avoid two warnings about discarding 'const' qualifier from pointer target type. * tests/test-posix_spawn2.c (main): Likewise.
-rw-r--r--ChangeLog7
-rw-r--r--tests/test-posix_spawn1.c2
-rw-r--r--tests/test-posix_spawn2.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 748f09837c..7b67d0f600 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-03-20 Jim Meyering <meyering@redhat.com>
+
+ tests: avoid gcc warnings about argv vs. const initializers
+ * tests/test-posix_spawn1.c (main): Cast to "(char *)" to avoid two
+ warnings about discarding 'const' qualifier from pointer target type.
+ * tests/test-posix_spawn2.c (main): Likewise.
+
2012-03-20 Reuben Thomas <rrt@sc3d.org>
README-release: simplify slightly
diff --git a/tests/test-posix_spawn1.c b/tests/test-posix_spawn1.c
index 9c41039851..5152d5c897 100644
--- a/tests/test-posix_spawn1.c
+++ b/tests/test-posix_spawn1.c
@@ -75,7 +75,7 @@ fd_safer (int fd)
int
main ()
{
- char *argv[3] = { "/bin/sh", CHILD_PROGRAM_FILENAME, NULL };
+ char *argv[3] = { (char *) "/bin/sh", (char *) CHILD_PROGRAM_FILENAME, NULL };
int ifd[2];
sigset_t blocked_signals;
sigset_t fatal_signal_set;
diff --git a/tests/test-posix_spawn2.c b/tests/test-posix_spawn2.c
index 39479ebea9..e66c9f2561 100644
--- a/tests/test-posix_spawn2.c
+++ b/tests/test-posix_spawn2.c
@@ -53,7 +53,7 @@ fd_safer (int fd)
int
main ()
{
- char *argv[3] = { "/bin/sh", CHILD_PROGRAM_FILENAME, NULL };
+ char *argv[3] = { (char *) "/bin/sh", (char *) CHILD_PROGRAM_FILENAME, NULL };
int ofd[2];
sigset_t blocked_signals;
sigset_t fatal_signal_set;