From b01d1f0aa2dc831155b8c8edf24c9fc7720c3613 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 26 Apr 2020 22:36:02 +0200 Subject: [PATCH] Avoid printing size_t in ht2crack5 for Mingw --- tools/hitag2crack/crack5/ht2crack5.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/hitag2crack/crack5/ht2crack5.c b/tools/hitag2crack/crack5/ht2crack5.c index 33145d99a..ea1cc5ac8 100644 --- a/tools/hitag2crack/crack5/ht2crack5.c +++ b/tools/hitag2crack/crack5/ht2crack5.c @@ -181,11 +181,11 @@ int main(int argc, char *argv[]) { } void *find_state(void *thread_d) { - size_t thread = (size_t)thread_d; + uint64_t thread = (uint64_t)thread_d; - for (size_t index = thread; index < layer_0_found; index += thread_count) { + for (uint64_t index = thread; index < layer_0_found; index += thread_count) { if (((index / thread_count) & 0xFF) == 0) - printf("Thread %zu slice %zu/%zu\n", thread, index / thread_count / 256 + 1, layer_0_found / thread_count / 256); + printf("Thread %" PRIu64 " slice %" PRIu64 "/%" PRIu64 "\n", thread, index / thread_count / 256 + 1, layer_0_found / thread_count / 256); uint64_t state0 = candidates[index]; bitslice(state0 >> 2, &state[0], 46, false); for (size_t bit = 0; bit < 8; bit++) {