diff options
5 files changed, 9 insertions, 12 deletions
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index cdb274b0e61..285fbe96638 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -419,8 +419,8 @@ GHOST_WindowX11( x_image = XCreateImage(display, m_visual->visual, 24, ZPixmap, 0, NULL, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT, 32, 0); mask_image = XCreateImage(display, m_visual->visual, 1, ZPixmap, 0, NULL, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT, 8, 0); - x_image->data = (char *)malloc(x_image->bytes_per_line * BLENDER_ICON_HEIGHT); - mask_image->data = (char *)malloc(mask_image->bytes_per_line * BLENDER_ICON_HEIGHT); + x_image->data = (char *)calloc(x_image->bytes_per_line * BLENDER_ICON_HEIGHT, 1); + mask_image->data = (char *)calloc(mask_image->bytes_per_line * BLENDER_ICON_HEIGHT, 1); /* copy the BLENDER_ICON_48x48x24 into the XImage */ unsigned char *col = BLENDER_ICON_48x48x24; @@ -429,7 +429,11 @@ GHOST_WindowX11( for (py = 0; py < BLENDER_ICON_HEIGHT; py++, col += 3) { /* mask out pink */ if (col[0] == 255 && col[1] == 0 && col[2] == 255) { +#if 0 + /* instead, use calloc above */ + XPutPixel(x_image, px, py, 0); /* avoid uninitialized memory, otherwise not needed */ XPutPixel(mask_image, px, py, 0); +#endif } else { XPutPixel(x_image, px, py, (col[0] << 16) + (col[1] << 8) + col[2]); @@ -1143,7 +1147,6 @@ GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state) } #include <iostream> -using namespace std; GHOST_TSuccess GHOST_WindowX11:: diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 046e5c3587c..d07f19e78e0 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -29,15 +29,11 @@ * \ingroup bli */ - #include <assert.h> #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" - - - #include "BLI_kdopbvh.h" #include "BLI_math.h" @@ -45,8 +41,6 @@ #include <omp.h> #endif - - #define MAX_TREETYPE 32 #define DEFAULT_FIND_NEAREST_HEAP_SIZE 1024 diff --git a/source/blender/compositor/intern/COM_CompositorContext.cpp b/source/blender/compositor/intern/COM_CompositorContext.cpp index 23a15d54b80..fbdb4cd6b28 100644 --- a/source/blender/compositor/intern/COM_CompositorContext.cpp +++ b/source/blender/compositor/intern/COM_CompositorContext.cpp @@ -26,7 +26,7 @@ CompositorContext::CompositorContext() { - this->m_rd = 0; + this->m_rd = NULL; this->m_quality = COM_QUALITY_HIGH; this->m_hasActiveOpenCLDevices = false; this->m_activegNode = NULL; diff --git a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp index 2e37782d047..16d70297a34 100644 --- a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp @@ -151,7 +151,7 @@ RayObject *RE_rayobject_qbvh_create(int size) #else -RayObject *RE_rayobject_qbvh_create(int size) +RayObject *RE_rayobject_qbvh_create(int UNUSED(size)) { puts("WARNING: SSE disabled at compile time\n"); return NULL; diff --git a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp index 697ba9ad6e2..c1bdfa6c72c 100644 --- a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp @@ -183,7 +183,7 @@ RayObject *RE_rayobject_svbvh_create(int size) #else -RayObject *RE_rayobject_svbvh_create(int size) +RayObject *RE_rayobject_svbvh_create(int UNUSED(size)) { puts("WARNING: SSE disabled at compile time\n"); return NULL; |