Cleanup: fix compiler warnings.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 24 Jan 2019 06:30:24 +0000 (07:30 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 24 Jan 2019 06:41:36 +0000 (07:41 +0100)
source/blender/draw/intern/draw_builtin_shader.c
source/blender/draw/modes/paint_vertex_mode.c

index 56bdd65..5c0c005 100644 (file)
@@ -97,12 +97,14 @@ static GPUShader *drw_shader_get_builtin_shader_clipped(eGPUBuiltinShader shader
        return shader;
 }
 
+#ifndef NDEBUG
 static bool drw_shader_get_builtin_shader_test_all(eGPUBuiltinShader shader_id)
 {
        bool test = false;
        drw_shader_get_builtin_shader_clipped(shader_id, &test);
        return test;
 }
+#endif
 
 GPUShader *DRW_shader_get_builtin_shader(eGPUBuiltinShader shader_id, eDRW_ShaderSlot slot)
 {
@@ -123,6 +125,7 @@ GPUShader *DRW_shader_get_builtin_shader(eGPUBuiltinShader shader_id, eDRW_Shade
        }
        else {
                BLI_assert(0);
+               return NULL;
        }
 }
 
index 9fb307b..d63f621 100644 (file)
@@ -85,7 +85,7 @@ typedef struct PAINT_VERTEX_Shaders {
 
 static struct {
        PAINT_VERTEX_Shaders sh_data[DRW_SHADER_SLOT_LEN];
-} e_data = {NULL}; /* Engine data */
+} e_data = {{{NULL}}}; /* Engine data */
 
 typedef struct PAINT_VERTEX_PrivateData {
        DRWShadingGroup *fvcolor_shgrp;