DORMANTno replies

[PATCH v2] rt-tests: cyclictest: Suppress compiler warnings for unused variables

From: Eder Zulian <hidden>
Date: 2023-08-14 12:04:17
Subsystem: the rest · Maintainer: Linus Torvalds

Using an attribute to inform the compiler that variables are expect to
be unused so it will not issue a warning.

Signed-off-by: Eder Zulian <redacted>
---
V1 -> V2: Cleaned up style and addressed review comments

 src/cyclictest/cyclictest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 4a7108e..a28057c 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1614,7 +1614,7 @@ static void rstat_print_stat(struct thread_param *par, int index, int verbose, i
  * thread that creates a named fifo and hands out run stats when someone
  * reads from the fifo.
  */
-static void *fifothread(void *param)
+static void *fifothread(__attribute__((__unused__)) void *param)
 {
 	int ret;
 	int fd;
@@ -1795,7 +1795,7 @@ rstat_err:
 	return;
 }
 
-static void write_stats(FILE *f, void *data)
+static void write_stats(FILE *f, __attribute__((__unused__)) void *data)
 {
 	struct thread_param **par = parameters;
 	unsigned int i, j, comma;
-- 
2.39.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help