[LTP] [PATCH 03/12] posix/pthread_create/*: Remove unused variable
Joerg Vehlow
lkml@jv-coder.de
Fri Nov 19 08:45:53 CET 2021
From: Joerg Vehlow <joerg.vehlow@aox-tech.de>
While pad was supposed to speed up stack growth, the test
works without it and it was propably optimized out anyway.
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
.../conformance/interfaces/pthread_create/1-5.c | 3 ---
.../conformance/interfaces/pthread_create/3-2.c | 2 --
2 files changed, 5 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
index c4756ab6f..33c5b5cb6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
@@ -100,12 +100,9 @@
static void *overflow(void *arg)
{
void *current;
- void *pad[50]; /* We want to consume the stack quickly */
long stacksize = sysconf(_SC_THREAD_STACK_MIN); /* make sure we touch the current stack memory */
int ret = 0;
- pad[1] = NULL; /* so compiler stops complaining about unused variables */
-
if (arg == NULL) {
/* first call */
current = overflow(¤t);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
index a508fc45e..433ccd8fe 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
@@ -108,10 +108,8 @@ static sem_t semsync[2]; /* These semaphores will only be used in child process
static void *overflow(void *arg)
{
void *current;
- void *pad[50]; /* We want to consume the stack quickly */
long stacksize = sysconf(_SC_THREAD_STACK_MIN); /* make sure we touch the current stack memory */
- pad[1] = NULL; /* so compiler stops complaining about unused variables */
int ret = 0;
if (arg == NULL) {
--
2.25.1
More information about the ltp
mailing list