From 052b7568408b035a3676f35ac78263606385dbdd Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 4 Jan 2022 18:39:49 +0100 Subject: [PATCH] Fix two warnings --- test/simple-memory-corruption/write_after_free_large_reuse.c | 3 ++- test/simple-memory-corruption/write_after_free_small_reuse.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/simple-memory-corruption/write_after_free_large_reuse.c b/test/simple-memory-corruption/write_after_free_large_reuse.c index e558298..586aa4c 100644 --- a/test/simple-memory-corruption/write_after_free_large_reuse.c +++ b/test/simple-memory-corruption/write_after_free_large_reuse.c @@ -2,6 +2,7 @@ #include #include "../test_util.h" +#include "../../util.h" OPTNONE int main(void) { char *p = malloc(256 * 1024); @@ -9,7 +10,7 @@ OPTNONE int main(void) { return 1; } free(p); - char *q = malloc(256 * 1024); + UNUSED char *q = malloc(256 * 1024); p[64 * 1024 + 1] = 'a'; return 0; } diff --git a/test/simple-memory-corruption/write_after_free_small_reuse.c b/test/simple-memory-corruption/write_after_free_small_reuse.c index 315407a..d6250f0 100644 --- a/test/simple-memory-corruption/write_after_free_small_reuse.c +++ b/test/simple-memory-corruption/write_after_free_small_reuse.c @@ -2,6 +2,7 @@ #include #include "../test_util.h" +#include "../../util.h" OPTNONE int main(void) { char *p = malloc(128); @@ -9,7 +10,7 @@ OPTNONE int main(void) { return 1; } free(p); - char *q = malloc(128); + UNUSED char *q = malloc(128); p[65] = 'a';