Add cast around malloc
authorTim Zakian <2895723+tzakian@users.noreply.github.com>
Fri, 11 Jan 2019 17:49:26 +0000 (09:49 -0800)
committerTim Zakian <2895723+tzakian@users.noreply.github.com>
Fri, 11 Jan 2019 17:49:26 +0000 (09:49 -0800)
programs/lz4io.c

index 2eeb154..6bb6c48 100644 (file)
@@ -157,7 +157,7 @@ struct LZ4IO_prefs_s {
 
 LZ4IO_prefs_t* LZ4IO_defaultPreferences(void)
 {
-  LZ4IO_prefs_t* const ret = malloc(sizeof(LZ4IO_prefs_t));
+  LZ4IO_prefs_t* const ret = (LZ4IO_prefs_t*)malloc(sizeof(LZ4IO_prefs_t));
   if (!ret) EXM_THROW(21, "Allocation error : not enough memory");
   ret->passThrough = 0;
   ret->overwrite = 1;