From ffc185cc9ec55d4bfb438e12c001e3b5e4e78e22 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 3 Oct 2024 19:34:52 +0200 Subject: [PATCH] Should fix clang-19 warning --- client/src/cmdhfmfhard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfmfhard.c b/client/src/cmdhfmfhard.c index 5b02d7c9f..d25bcf37e 100644 --- a/client/src/cmdhfmfhard.c +++ b/client/src/cmdhfmfhard.c @@ -260,7 +260,7 @@ static void init_bitflip_bitarrays(void) { #endif uint64_t init_bitflip_bitarrays_starttime = msclock(); - char state_file_name[MAX(strlen(STATE_FILE_TEMPLATE_RAW), MAX(strlen(STATE_FILE_TEMPLATE_LZ4), strlen(STATE_FILE_TEMPLATE_BZ2))) + 1]; + char state_file_name[MAX(sizeof(STATE_FILE_TEMPLATE_RAW), MAX(sizeof(STATE_FILE_TEMPLATE_LZ4), sizeof(STATE_FILE_TEMPLATE_BZ2)))]; char state_files_path[strlen(get_my_executable_directory()) + strlen(STATE_FILES_DIRECTORY) + sizeof(state_file_name)]; uint16_t nraw = 0, nlz4 = 0, nbz2 = 0; for (odd_even_t odd_even = EVEN_STATE; odd_even <= ODD_STATE; odd_even++) {