Skip to content

Commit

Permalink
test: fix -Wpointer-to-int-cast on 32 bits systems (libuv#4309)
Browse files Browse the repository at this point in the history
The return value from signal(2) is a pointer. Use the right macro.
  • Loading branch information
bnoordhuis authored Feb 9, 2024
1 parent 08a1e7f commit 009d741
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test-spawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ TEST_IMPL(kill) {
sigaddset(&set, SIGTERM);
ASSERT_OK(pthread_sigmask(SIG_BLOCK, &set, NULL));
}
ASSERT_NE(SIG_ERR, signal(SIGTERM, SIG_IGN));
ASSERT_PTR_NE(SIG_ERR, signal(SIGTERM, SIG_IGN));
#endif

r = uv_spawn(uv_default_loop(), &process, &options);
Expand All @@ -1067,7 +1067,7 @@ TEST_IMPL(kill) {
sigaddset(&set, SIGTERM);
ASSERT_OK(pthread_sigmask(SIG_UNBLOCK, &set, NULL));
}
ASSERT_NE(SIG_ERR, signal(SIGTERM, SIG_DFL));
ASSERT_PTR_NE(SIG_ERR, signal(SIGTERM, SIG_DFL));
#endif

/* Sending signum == 0 should check if the
Expand Down

0 comments on commit 009d741

Please sign in to comment.