diff --git a/libraries/Desktop/support/DataFlash.cpp b/libraries/Desktop/support/DataFlash.cpp index faf89b7eb9..80ddd52bb1 100644 --- a/libraries/Desktop/support/DataFlash.cpp +++ b/libraries/Desktop/support/DataFlash.cpp @@ -30,7 +30,7 @@ void DataFlash_Class::Init(void) flash_fd = open("dataflash.bin", O_RDWR, 0777); if (flash_fd == -1) { uint8_t *fill; - fill = malloc(DF_PAGE_SIZE*DF_NUM_PAGES); + fill = (uint8_t *)malloc(DF_PAGE_SIZE*DF_NUM_PAGES); flash_fd = open("dataflash.bin", O_RDWR | O_CREAT, 0777); memset(fill, 0xFF, DF_PAGE_SIZE*DF_NUM_PAGES); write(flash_fd, fill, DF_PAGE_SIZE*DF_NUM_PAGES);