Cleanup: Fix warnings in bf_dna
authorRay Molenkamp <github@lazydodo.com>
Mon, 27 May 2019 14:49:19 +0000 (08:49 -0600)
committerRay Molenkamp <github@lazydodo.com>
Mon, 27 May 2019 14:49:34 +0000 (08:49 -0600)
Passing a const char** to MEM_recallocN lead to

C4090 'function': different 'const' qualifiers

warnings with MSVC

source/blender/makesdna/intern/dna_genfile.c

index 8c6ff45..3cc0055 100644 (file)
@@ -1585,7 +1585,8 @@ static bool DNA_sdna_patch_struct_member_nr(SDNA *sdna,
 
       if (sdna->names_len == sdna->names_len_alloc) {
         sdna->names_len_alloc += 64;
-        sdna->names = MEM_recallocN(sdna->names, sizeof(*sdna->names) * sdna->names_len_alloc);
+        sdna->names = MEM_recallocN((void *)sdna->names,
+                                    sizeof(*sdna->names) * sdna->names_len_alloc);
         sdna->names_array_len = MEM_recallocN(
             (void *)sdna->names_array_len, sizeof(*sdna->names_array_len) * sdna->names_len_alloc);
       }