Thread (24 messages) 24 messages, 5 authors, 2012-03-21
STALE5239d

[PATCH 2/3] rt-tests: Silence unused-but-set warning in rt-migrate-test

From: Darren Hart <hidden>
Date: 2012-03-20 19:06:36
Subsystem: the rest · Maintainer: Linus Torvalds

The variable "end" is set and used, but gcc appears to lose track of it
across the call to lgprint when it gets incorporated into the va_list.
Silence the warning using the unused attribute.

Signed-off-by: Darren Hart <redacted>
CC: Clark Williams <redacted>
CC: John Kacur <jkacur@redhat.com>
---
 src/rt-migrate-test/rt-migrate-test.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c
index 1963641..d2ac400 100644
--- a/src/rt-migrate-test/rt-migrate-test.c
+++ b/src/rt-migrate-test/rt-migrate-test.c
@@ -532,7 +532,7 @@ int main (int argc, char **argv)
 	logdev_switch_set(1);
 
 	for (loop=0; loop < nr_runs; loop++) {
-		unsigned long long end;
+		unsigned long long __attribute__ ((unused)) end;
 
 		now = get_time();
 
-- 
1.7.6.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help