From: Joerg Vehlow <lkml@jv-coder.de>
To: ltp@lists.linux.it
Cc: Joerg Vehlow <joerg.vehlow@aox-tech.de>
Subject: [LTP] [PATCH 06/12] posix/conformance/interfaces: Fix all unused function warnings
Date: Fri, 19 Nov 2021 08:45:56 +0100 [thread overview]
Message-ID: <20211119074602.857595-7-lkml@jv-coder.de> (raw)
In-Reply-To: <20211119074602.857595-1-lkml@jv-coder.de>
From: Joerg Vehlow <joerg.vehlow@aox-tech.de>
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
.../conformance/interfaces/pthread_attr_setstack/6-1.c | 6 ------
.../conformance/interfaces/pthread_attr_setstack/7-1.c | 6 ------
.../interfaces/pthread_attr_setstacksize/4-1.c | 6 ------
.../conformance/interfaces/pthread_exit/4-1.c | 9 ++-------
.../conformance/interfaces/pthread_exit/5-1.c | 7 +------
.../conformance/interfaces/pthread_kill/8-1.c | 8 --------
.../conformance/interfaces/pthread_mutex_lock/1-1.c | 4 ++--
.../conformance/interfaces/pthread_sigmask/18-1.c | 8 --------
8 files changed, 5 insertions(+), 49 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c
index 5eac212f9..d298c30ec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c
@@ -31,12 +31,6 @@
static void *stack_addr;
static size_t stack_size;
-static void *thread_func()
-{
- pthread_exit(0);
- return NULL;
-}
-
int main(void)
{
pthread_attr_t attr;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c
index bc7f4f415..932fa8200 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c
@@ -32,12 +32,6 @@
static void *stack_addr;
static size_t stack_size;
-static void *thread_func()
-{
- pthread_exit(0);
- return NULL;
-}
-
int main(void)
{
pthread_attr_t attr;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c
index b229d7052..800913a66 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c
@@ -28,12 +28,6 @@
#define STACKSIZE PTHREAD_STACK_MIN - sysconf(_SC_PAGE_SIZE)
-static void *thread_func()
-{
- pthread_exit(0);
- return NULL;
-}
-
int main(void)
{
pthread_attr_t attr;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/4-1.c
index 1252d5619..810df0c34 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/4-1.c
@@ -91,12 +91,7 @@
static int global = 0;
-/* atexit() routines */
-static void at1(void)
-{
- global +=1;
-}
-
+/* atexit() routine */
static void at2(void)
{
global +=2;
@@ -107,7 +102,7 @@ static void *threaded(void *arg PTS_ATTRIBUTE_UNUSED)
{
int ret = 0;
- /* Note that this funtion will be registered once again for each scenario.
+ /* Note that this function will be registered once again for each scenario.
POSIX requires the ability to register at least 32 functions so it should
not be an issue in our case, as long as we don't get more than 32 scenarii
(with joinable threads) */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/5-1.c
index 730b751eb..69d5c6a97 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/5-1.c
@@ -91,12 +91,7 @@
static int atctl = 0;
static pthread_key_t tld[3];
-/* atexit() routines */
-static void at1(void)
-{
- atctl += 1;
-}
-
+/* atexit() routine */
static void at2(void)
{
atctl += 2;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
index 086a0cf5c..b61a08173 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
@@ -153,14 +153,6 @@ static void sighdl2(int sig PTS_ATTRIBUTE_UNUSED)
#endif
}
-static int init_ctl;
-/* Init function */
-static void initializer(void)
-{
- init_ctl++;
- return;
-}
-
/* Test function -- calls pthread_kill() and checks that EINTR is never returned. */
static void *test(void *arg PTS_ATTRIBUTE_UNUSED)
{
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c
index 913251914..4fccbfdf4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c
@@ -36,7 +36,7 @@ static int value; /* value protected by mutex */
int main(void)
{
- int i, rc;
+ int i;
pthread_attr_t pta;
pthread_t threads[THREAD_NUM];
//pthread_t self = pthread_self();
@@ -47,7 +47,7 @@ int main(void)
/* Create threads */
fprintf(stderr, "Creating %d threads\n", THREAD_NUM);
for (i = 0; i < THREAD_NUM; ++i)
- rc = pthread_create(&threads[i], &pta, f1, NULL);
+ pthread_create(&threads[i], &pta, f1, NULL);
/* Wait to join all threads */
for (i = 0; i < THREAD_NUM; ++i)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
index 81ba4ea9b..5801e0e60 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
@@ -153,14 +153,6 @@ static void sighdl2(int sig PTS_ATTRIBUTE_UNUSED)
#endif
}
-static int init_ctl;
-/* Init function */
-static void initializer(void)
-{
- init_ctl++;
- return;
-}
-
/* Test function -- calls pthread_sigmask() and checks that EINTR is never returned. */
static void *test(void *arg PTS_ATTRIBUTE_UNUSED)
{
--
2.25.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2021-11-19 7:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 7:45 [LTP] [Patch 00/12] Fix or suppress compiler warnings in posix/conformance/interfaces Joerg Vehlow
2021-11-19 7:45 ` [LTP] [PATCH 01/12] posix/pthread_create/15-1: Supress warning Joerg Vehlow
2021-11-19 14:34 ` Cyril Hrubis
2021-11-19 7:45 ` [LTP] [PATCH 02/12] posix/mq_(timed)send/5-1: Fix error reporting Joerg Vehlow
2021-11-19 14:44 ` Cyril Hrubis
2021-11-22 6:45 ` Joerg Vehlow
2021-11-22 9:10 ` Cyril Hrubis
2021-11-19 7:45 ` [LTP] [PATCH 03/12] posix/pthread_create/*: Remove unused variable Joerg Vehlow
2021-11-19 14:51 ` Cyril Hrubis
2021-11-19 7:45 ` [LTP] [PATCH 04/12] posix/conformance/interfaces: Fix unsued-variable for testfrmw Joerg Vehlow
2021-11-19 15:07 ` Cyril Hrubis
2021-11-22 6:48 ` Joerg Vehlow
2021-11-19 7:45 ` [LTP] [PATCH 05/12] posix/conformance/interfaces: Fix all unused variable warnings Joerg Vehlow
2021-11-19 15:23 ` Cyril Hrubis
2021-11-22 6:41 ` Joerg Vehlow
2021-11-22 9:43 ` Cyril Hrubis
2021-11-19 7:45 ` Joerg Vehlow [this message]
2021-11-19 15:27 ` [LTP] [PATCH 06/12] posix/conformance/interfaces: Fix all unused function warnings Cyril Hrubis
2021-11-19 7:45 ` [LTP] [PATCH 07/12] posix/pthread_key_create/2-1: Remove invalid part of test Joerg Vehlow
2021-11-19 15:32 ` Cyril Hrubis
2021-11-19 7:45 ` [LTP] [PATCH 08/12] posix/asctime: Fix potentioal buffer overflow Joerg Vehlow
2021-11-19 15:33 ` Cyril Hrubis
2021-11-19 7:45 ` [LTP] [PATCH 09/12] posix/conformance/interfaces/pthread_*_destroy: Suppress nonnull warning Joerg Vehlow
2021-11-19 15:35 ` Cyril Hrubis
2021-11-19 7:46 ` [LTP] [PATCH 10/12] posix/conformance/interfaces: Fix all sign-compare warnings Joerg Vehlow
2021-11-19 15:37 ` Cyril Hrubis
2021-11-19 7:46 ` [LTP] [PATCH 11/12] posix/conformance/interface/mmap/5-1: Remove invalid static Joerg Vehlow
2021-11-19 15:38 ` Cyril Hrubis
2021-11-19 7:46 ` [LTP] [PATCH 12/12] posix/interface/conformance: Fix/supress all unused-result warnings Joerg Vehlow
2021-11-19 15:43 ` Cyril Hrubis
2021-11-22 6:42 ` Joerg Vehlow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211119074602.857595-7-lkml@jv-coder.de \
--to=lkml@jv-coder.de \
--cc=joerg.vehlow@aox-tech.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox