[PATCH v2 3/4] testsuite/smokey/vxworktests: Fix compile error seen with gcc 16
Florian Bezdeka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
Fixes the following error:
task-2.c: In function ‘backgroundTask’:
task-2.c:26:42: error: variable ‘count’ set but not used [-Werror=unused-but-set-variable=]
26 | unsigned int safety = 100000000, count = 0;
| ^~~~~
cc1: all warnings being treated as errors
The busy waiting loop - to my understanding - is keeping the background
task alive, so that the foreground task is able to call taskSuspend()
for the background task.
As the background task is calling safe_pause(), the task will wait
for the termination signal anyhow, so busy waiting upfront is not
necessary.
Signed-off-by: Florian Bezdeka <[email protected]>
---
testsuite/smokey/vxworkstests/task-2.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/testsuite/smokey/vxworkstests/task-2.c b/testsuite/smokey/vxworkstests/task-2.c
index 0cbb9e18a13383418c4360241ef244b8a24da975..60462e64ea7b2b4ddc810f336eea906cf6ca8c8f 100644
--- a/testsuite/smokey/vxworkstests/task-2.c
+++ b/testsuite/smokey/vxworkstests/task-2.c
@@ -23,7 +23,6 @@ static SEM_ID sem_id, fdone_sem_id;
static void backgroundTask(long arg, ...)
{
- unsigned int safety = 100000000, count = 0;
int ret;
traceobj_enter(&trobj);
@@ -35,9 +34,6 @@ static void backgroundTask(long arg, ...)
traceobj_mark(&trobj, 2);
- while (--safety > 0)
- count++;
-
/*
* Enter infinite pause so that any pending cancellation is
* taken regardless of whether async-cancel is enabled or not.
--
2.54.0