From 4c00cc5bcfd02818c7ca383e546ae3e65be09689 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 14 Sep 2021 23:00:52 +0200 Subject: [PATCH] cppcheck assigned val never used and reduce var scope --- tools/hitag2crack/crack2/ht2crack2buildtable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/hitag2crack/crack2/ht2crack2buildtable.c b/tools/hitag2crack/crack2/ht2crack2buildtable.c index 306cb5b72..5454b0717 100644 --- a/tools/hitag2crack/crack2/ht2crack2buildtable.c +++ b/tools/hitag2crack/crack2/ht2crack2buildtable.c @@ -369,7 +369,6 @@ static void *sorttable(void *dd) { char outfile[64]; unsigned char *data = NULL; struct stat filestat; - uint64_t numentries = 0; int index = (int)(long)dd; int space = 0x100 / NUM_SORT_THREADS; @@ -410,7 +409,7 @@ static void *sorttable(void *dd) { // copy data into table memcpy(table, data, filestat.st_size); - numentries = filestat.st_size / DATASIZE; + uint64_t numentries = filestat.st_size / DATASIZE; // unmap file and close it if (munmap(data, filestat.st_size)) {