Mercurial > hg > octave-lyh > gnulib-hg
changeset 16710:91a203d21bbc
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.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Tue, 20 Mar 2012 20:35:44 +0100 |
parents | 2b67797f59e7 |
children | c9ce7d847cbf |
files | ChangeLog tests/test-posix_spawn1.c tests/test-posix_spawn2.c |
diffstat | 3 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- a/tests/test-posix_spawn1.c +++ b/tests/test-posix_spawn1.c @@ -75,7 +75,7 @@ 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;
--- a/tests/test-posix_spawn2.c +++ b/tests/test-posix_spawn2.c @@ -53,7 +53,7 @@ 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;