From 61c77f75d9b63b4e7ace8a96b9e1c6d3b1dca535 Mon Sep 17 00:00:00 2001 From: Nathaniel Filardo <105816689+nwf-msr@users.noreply.github.com> Date: Sun, 14 Jan 2024 00:52:14 +0000 Subject: [PATCH] Fix two set but unused variables (#52) FIXES #51 --- libCacheSim/cache/eviction/Random.c | 3 ++- libCacheSim/cache/eviction/RandomTwo.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libCacheSim/cache/eviction/Random.c b/libCacheSim/cache/eviction/Random.c index c89e3ab7..94f9d374 100644 --- a/libCacheSim/cache/eviction/Random.c +++ b/libCacheSim/cache/eviction/Random.c @@ -48,7 +48,8 @@ cache_t *Random_init(const common_cache_params_t ccache_params, common_cache_params_t ccache_params_copy = ccache_params; ccache_params_copy.hashpower = MAX(12, ccache_params_copy.hashpower - 8); - cache_t *cache = cache_struct_init("Random", ccache_params, cache_specific_params); + cache_t *cache = + cache_struct_init("Random", ccache_params_copy, cache_specific_params); cache->cache_init = Random_init; cache->cache_free = Random_free; cache->get = Random_get; diff --git a/libCacheSim/cache/eviction/RandomTwo.c b/libCacheSim/cache/eviction/RandomTwo.c index 1fd933b1..9c432aeb 100644 --- a/libCacheSim/cache/eviction/RandomTwo.c +++ b/libCacheSim/cache/eviction/RandomTwo.c @@ -50,7 +50,7 @@ cache_t *RandomTwo_init(const common_cache_params_t ccache_params, ccache_params_copy.hashpower = MAX(12, ccache_params_copy.hashpower - 8); cache_t *cache = - cache_struct_init("RandomTwo", ccache_params, cache_specific_params); + cache_struct_init("RandomTwo", ccache_params_copy, cache_specific_params); cache->cache_init = RandomTwo_init; cache->cache_free = RandomTwo_free; cache->get = RandomTwo_get;