From 84b9d95e6a8f847da287c3bcd028b74a12e2f36d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 21 Apr 2021 10:13:50 -0700 Subject: [PATCH] execute-tests: pacify compiler * tests/test-execute-main.c (main): Use 0x7DEADBEE rather than 0xDEADBEEF for nonces, to avoid provoking AIX XLC compiler warning that the latter is out of int range. --- ChangeLog | 7 +++++++ tests/test-execute-main.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2ea4e5093..3aaee32bff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-04-21 Paul Eggert + + execute-tests: pacify compiler + * tests/test-execute-main.c (main): Use 0x7DEADBEE rather than + 0xDEADBEEF for nonces, to avoid provoking AIX XLC compiler warning + that the latter is out of int range. + 2021-04-20 Paul Eggert malloc-gnu-tests, etc.: use volatile for clang diff --git a/tests/test-execute-main.c b/tests/test-execute-main.c index 944dcd1ee2..a6a9fe4069 100644 --- a/tests/test-execute-main.c +++ b/tests/test-execute-main.c @@ -132,7 +132,7 @@ main (int argc, char *argv[]) { /* Check SIGPIPE handling with ignore_sigpipe = false. */ const char *prog_argv[3] = { prog_path, "3", NULL }; - int termsig = 0xDEADBEEF; + int termsig = 0x7DEADBEE; int ret = execute (progname, prog_argv[0], prog_argv, NULL, false, false, false, false, true, false, &termsig); ASSERT (ret == 127); @@ -145,7 +145,7 @@ main (int argc, char *argv[]) { /* Check SIGPIPE handling with ignore_sigpipe = true. */ const char *prog_argv[3] = { prog_path, "4", NULL }; - int termsig = 0xDEADBEEF; + int termsig = 0x7DEADBEE; int ret = execute (progname, prog_argv[0], prog_argv, NULL, true, false, false, false, true, false, &termsig); ASSERT (ret == 0); @@ -157,7 +157,7 @@ main (int argc, char *argv[]) { /* Check other signal. */ const char *prog_argv[3] = { prog_path, "5", NULL }; - int termsig = 0xDEADBEEF; + int termsig = 0x7DEADBEE; int ret = execute (progname, prog_argv[0], prog_argv, NULL, false, false, false, false, true, false, &termsig); ASSERT (ret == 127); -- 2.39.5