mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-04-28 06:33:36 +00:00
maint: pacify -Wdiscarded-qualifiers
* tests/test-posix_spawn-dup2-stdin.c (main): * tests/test-posix_spawn-dup2-stdout.c (main): * tests/test-posix_spawn-inherit0.c (parent_main): * tests/test-posix_spawn-inherit1.c (parent_main): * tests/test-posix_spawn-open1.c (parent_main): * tests/test-posix_spawn-open2.c (parent_main): Reword to avoid need to cast string literals to char *, while also pacifying gcc -Wdiscarded-qualifiers.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,5 +1,15 @@
|
||||
2026-01-13 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
maint: pacify -Wdiscarded-qualifiers
|
||||
* tests/test-posix_spawn-dup2-stdin.c (main):
|
||||
* tests/test-posix_spawn-dup2-stdout.c (main):
|
||||
* tests/test-posix_spawn-inherit0.c (parent_main):
|
||||
* tests/test-posix_spawn-inherit1.c (parent_main):
|
||||
* tests/test-posix_spawn-open1.c (parent_main):
|
||||
* tests/test-posix_spawn-open2.c (parent_main):
|
||||
Reword to avoid need to cast string literals to char *,
|
||||
while also pacifying gcc -Wdiscarded-qualifiers.
|
||||
|
||||
trunc-tests: pacify -Wmissing-prototypes
|
||||
* tests/test-trunc2.c (trunc_reference): Now static.
|
||||
|
||||
|
||||
@@ -50,7 +50,9 @@ fd_safer (int fd)
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char *argv[3] = { (char *) BOURNE_SHELL, (char *) CHILD_PROGRAM_FILENAME, NULL };
|
||||
char argv0[] = BOURNE_SHELL;
|
||||
char argv1[] = CHILD_PROGRAM_FILENAME;
|
||||
char *argv[] = { argv0, argv1, NULL };
|
||||
int ofd[2];
|
||||
sigset_t blocked_signals;
|
||||
sigset_t fatal_signal_set;
|
||||
|
||||
@@ -72,7 +72,9 @@ fd_safer (int fd)
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char *argv[3] = { (char *) BOURNE_SHELL, (char *) CHILD_PROGRAM_FILENAME, NULL };
|
||||
char argv0[] = BOURNE_SHELL;
|
||||
char argv1[] = CHILD_PROGRAM_FILENAME;
|
||||
char *argv[] = { argv0, argv1, NULL };
|
||||
int ifd[2];
|
||||
sigset_t blocked_signals;
|
||||
sigset_t fatal_signal_set;
|
||||
|
||||
@@ -38,7 +38,9 @@ static int
|
||||
parent_main (void)
|
||||
{
|
||||
FILE *fp;
|
||||
char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
|
||||
char argv0[] = CHILD_PROGRAM_FILENAME;
|
||||
char argv1[] = "-child";
|
||||
char *argv[] = { argv0, argv1, NULL };
|
||||
int err;
|
||||
pid_t child;
|
||||
int status;
|
||||
|
||||
@@ -38,7 +38,9 @@ static int
|
||||
parent_main (void)
|
||||
{
|
||||
FILE *fp;
|
||||
char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
|
||||
char argv0[] = CHILD_PROGRAM_FILENAME;
|
||||
char argv1[] = "-child";
|
||||
char *argv[] = { argv0, argv1, NULL };
|
||||
int err;
|
||||
pid_t child;
|
||||
int status;
|
||||
|
||||
@@ -50,7 +50,9 @@ static int
|
||||
parent_main (void)
|
||||
{
|
||||
FILE *fp;
|
||||
char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
|
||||
char argv0[] = CHILD_PROGRAM_FILENAME;
|
||||
char argv1[] = "-child";
|
||||
char *argv[] = { argv0, argv1, NULL };
|
||||
posix_spawn_file_actions_t actions;
|
||||
bool actions_allocated;
|
||||
int err;
|
||||
|
||||
@@ -38,7 +38,9 @@ static int
|
||||
parent_main (void)
|
||||
{
|
||||
FILE *fp;
|
||||
char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
|
||||
char argv0[] = CHILD_PROGRAM_FILENAME;
|
||||
char argv1[] = "-child";
|
||||
char *argv[] = { argv0, argv1, NULL };
|
||||
posix_spawn_file_actions_t actions;
|
||||
bool actions_allocated;
|
||||
int err;
|
||||
|
||||
Reference in New Issue
Block a user