diff mbox

[3/7] volatile-test: Fix build warnings

Message ID 1375133480-5597-4-git-send-email-john.stultz@linaro.org
State Accepted
Headers show

Commit Message

John Stultz July 29, 2013, 9:31 p.m. UTC
Fix unused variable warnings.

Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 volatile-test-signal.c | 2 --
 volatile-test.c        | 5 +----
 2 files changed, 1 insertion(+), 6 deletions(-)
diff mbox

Patch

diff --git a/volatile-test-signal.c b/volatile-test-signal.c
index 8c60451..df2068f 100644
--- a/volatile-test-signal.c
+++ b/volatile-test-signal.c
@@ -121,7 +121,6 @@  int main(int argc, char *argv[])
 	int i, purged;
 	char* file;
 	int fd;
-	int is_file = 0;
 	//signal(SIGBUS, signal_handler_sigbusy
 	//sigaction(SIGBUS, sigaction_sigbusy, NULL);
 	register_signal_handler();
@@ -129,7 +128,6 @@  int main(int argc, char *argv[])
 		file = argv[1];
 		fd = open(file, O_RDWR);
 		vaddr = mmap(0, FULLSIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-		is_file = 1;
 	} else {
 		is_anon = 1;
 		vaddr = malloc(FULLSIZE);
diff --git a/volatile-test.c b/volatile-test.c
index e23b55c..e148e19 100644
--- a/volatile-test.c
+++ b/volatile-test.c
@@ -83,12 +83,10 @@  int main(int argc, char *argv[])
 	int i, purged;
 	char* file;
 	int fd;
-	int is_file = 0;
 	if (argc > 1) {
 		file = argv[1];
 		fd = open(file, O_RDWR);
 		vaddr = mmap(0, FULLSIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-		is_file = 1;
 	} else {
 		is_anon = 1;
 		vaddr = malloc(FULLSIZE);
@@ -116,8 +114,7 @@  int main(int argc, char *argv[])
 //		printf("%c\n", vaddr[i*CHUNK]);
 
 	for(i=0; i < CHUNKNUM; ) {
-		int ret;
-		ret = mnovolatile(vaddr + (i*CHUNK), CHUNK, &purged);
+		mnovolatile(vaddr + (i*CHUNK), CHUNK, &purged);
 		i+=2;
 	}