From 28e0b888fe524a7f607b70126ce2d4113d87c1c5 Mon Sep 17 00:00:00 2001 From: Peter Holm Date: Sat, 5 Feb 2022 09:51:11 +0100 Subject: [PATCH] stress2: Fix compiler warnings --- tools/test/stress2/misc/callout_reset_on.sh | 2 -- tools/test/stress2/misc/callout_reset_on2.sh | 2 -- tools/test/stress2/misc/datamove3.sh | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/test/stress2/misc/callout_reset_on.sh b/tools/test/stress2/misc/callout_reset_on.sh index cdffc0dd67f..bafeeea270c 100755 --- a/tools/test/stress2/misc/callout_reset_on.sh +++ b/tools/test/stress2/misc/callout_reset_on.sh @@ -230,10 +230,8 @@ writer(void) { struct hostent *hostent; int i, r; char line[1024], ack[80];; - pid_t ppid; setproctitle("writer - init"); - ppid = getppid(); signal(SIGUSR1, handler); alarm(60); on = 1; diff --git a/tools/test/stress2/misc/callout_reset_on2.sh b/tools/test/stress2/misc/callout_reset_on2.sh index 270aeb95aa9..1a54097ff4b 100755 --- a/tools/test/stress2/misc/callout_reset_on2.sh +++ b/tools/test/stress2/misc/callout_reset_on2.sh @@ -201,11 +201,9 @@ writer(void) { struct hostent *hostent; int i, r; char line[1024], ack[80];; - pid_t ppid; setproctitle("writer - init"); share[SYNC] = 1; - ppid = getppid(); signal(SIGUSR1, handler); signal(SIGALRM, ahandler); alarm(60); diff --git a/tools/test/stress2/misc/datamove3.sh b/tools/test/stress2/misc/datamove3.sh index 47a1cbce4c9..19beffc0065 100755 --- a/tools/test/stress2/misc/datamove3.sh +++ b/tools/test/stress2/misc/datamove3.sh @@ -161,7 +161,7 @@ mapBuffer(void *ar) char *buffer; int i; - i = (int )ar; + i = (intptr_t)ar; addr = mmap(NULL, pagesize * 2, PROT_READ | PROT_WRITE, MAP_SHARED, a[i].fd1, 0); if (addr == MAP_FAILED) { err(1, "Mmap failed");