From 7b9bd1880c5eacbf33b55b94463c58b26cfc1544 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Tue, 24 Sep 2013 21:30:07 +0200 Subject: [PATCH] Add explicit casts for the msvc C++ compiler. --- src/ihex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ihex.c b/src/ihex.c index 5389696..559e4b4 100644 --- a/src/ihex.c +++ b/src/ihex.c @@ -44,7 +44,7 @@ dc_ihex_file_open (dc_ihex_file_t **result, dc_context_t *context, const char *f return DC_STATUS_INVALIDARGS; } - file = malloc (sizeof (dc_ihex_file_t)); + file = (dc_ihex_file_t *) malloc (sizeof (dc_ihex_file_t)); if (file == NULL) { ERROR (context, "Failed to allocate memory."); return DC_STATUS_NOMEMORY;