From db99b664dfd55ff33d8a328835b1d0ef2c2bb5b9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 9 Nov 2011 08:47:49 +1100 Subject: [PATCH] desktop: fixed malloc cast --- libraries/Desktop/support/DataFlash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);