From 15fd2a400979ef9a4a5074588bfed72f56c777bc Mon Sep 17 00:00:00 2001 From: Franz Fuchs Date: Thu, 8 Feb 2024 15:31:42 +0000 Subject: [PATCH] fixed compiler error for use of calloc --- Tests/elf_to_hex/elf_to_hex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/elf_to_hex/elf_to_hex.c b/Tests/elf_to_hex/elf_to_hex.c index 8d57e19..9e6d284 100644 --- a/Tests/elf_to_hex/elf_to_hex.c +++ b/Tests/elf_to_hex/elf_to_hex.c @@ -357,7 +357,7 @@ int main (int argc, char *argv []) } // Zero out the memory buffer before loading the ELF file - mem_buf = calloc(MAX_MEM_SIZE, sizeof(uint8_t)); + mem_buf = (uint8_t *)(calloc(MAX_MEM_SIZE, sizeof(uint8_t))); if (mem_buf == NULL) { fprintf (stderr, "ERROR: unable to allocate %lxMB for mem_buf\n", MAX_MEM_SIZE / 1024 / 1024); return 1;