Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set but unused variable #51

Closed
nwf-msr opened this issue Jan 11, 2024 · 1 comment · Fixed by #52
Closed

Set but unused variable #51

nwf-msr opened this issue Jan 11, 2024 · 1 comment · Fixed by #52

Comments

@nwf-msr
Copy link
Contributor

nwf-msr commented Jan 11, 2024

ccache_params_copy in Random.c is set but not used thereafter:

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);

I suspect the ccache_params on line 51 wants to be ccache_params_copy instead?

ETA: Also

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("RandomTwo", ccache_params, cache_specific_params);

@1a1a11a
Copy link
Owner

1a1a11a commented Jan 12, 2024

Good catch! Can you send a PR?

nwf-msr added a commit to nwf-msr/libCacheSim that referenced this issue Jan 13, 2024
1a1a11a pushed a commit that referenced this issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants