Fix T49991: reloading librairies doesn't update node groups.
[blender.git] / source / blender / datatoc / datatoc_icon.c
index e4b00388dbac28c9cb7b505d7aea22e1a936c769..92048f32a2863c7896c59ebe776a7da77fd19b4b 100644 (file)
@@ -32,7 +32,7 @@
 #include "../blenlib/BLI_sys_types.h"
 
 /* for DIR */
-#if !defined(WIN32) || defined(__MINGW64__)
+#if !defined(WIN32) || defined(FREEWINDOWS)
 #  include <dirent.h>
 #endif
 
@@ -166,7 +166,8 @@ static bool write_png(const char *name, const unsigned int *pixels,
        /* set the individual row-pointers to point at the correct offsets */
        for (i = 0; i < height; i++) {
                row_pointers[height - 1 - i] = (png_bytep)
-                                              (((unsigned char *)pixels) + (i * width) * bytesperpixel * sizeof(unsigned char));
+                                              (((const unsigned char *)pixels) +
+                                               (i * width) * bytesperpixel * sizeof(unsigned char));
        }
 
        /* write out the entire image data in one call */
@@ -314,6 +315,9 @@ static bool icon_merge(const char *file_src,
 
        free(pixels);
 
+       /* only for bounds check */
+       (void)canvas_h;
+
        return true;
 }