Cleanup: fix compiler warnings.

This commit is contained in:
2019-03-16 19:48:28 +01:00
parent ad390f514b
commit b9af4efe41
13 changed files with 15 additions and 14 deletions

View File

@@ -145,6 +145,7 @@ public:
return subresult;
case DEVICE_KERNEL_USING_FEATURE_KERNEL:
case DEVICE_KERNEL_UNKNOWN:
break;
}
}

View File

@@ -35,7 +35,7 @@ namespace DEG {
struct Depsgraph;
struct Node;
struct RNANodeQueryIDData;
class RNANodeQueryIDData;
/* For queries which gives operation node or key defines whether we are
* interested in a result of the given property or whether we are linking some

View File

@@ -929,7 +929,7 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
* generic backup structure. */
DrawDataList drawdata_backup;
DrawDataList *drawdata_ptr = NULL;
ObjectRuntimeBackup object_runtime_backup = {{0}};
ObjectRuntimeBackup object_runtime_backup = {{{0}}};
if (check_datablock_expanded(id_cow)) {
switch (id_type) {
case ID_OB:

View File

@@ -44,7 +44,7 @@ struct Depsgraph;
namespace DEG {
struct Depsgraph;
struct DepsgraphNodeBuilder;
class DepsgraphNodeBuilder;
struct IDNode;
/* Get fully expanded (ready for use) copy-on-write datablock for the given

View File

@@ -66,7 +66,7 @@ typedef struct BASIC_Shaders {
static struct {
BASIC_Shaders sh_data[GPU_SHADER_CFG_LEN];
} e_data = {NULL}; /* Engine data */
} e_data = {{{NULL}}}; /* Engine data */
typedef struct BASIC_PrivateData {
DRWShadingGroup *depth_shgrp;

View File

@@ -2140,7 +2140,7 @@ static void mesh_create_edit_vertex_loops(
uchar fflag;
/* Static formats */
static struct { GPUVertFormat sel_id, pos_nor, lnor, flag, uv; } format = { 0 };
static struct { GPUVertFormat sel_id, pos_nor, lnor, flag, uv; } format = {{ 0 }};
static struct { uint sel_id, pos, nor, lnor, data, uvs; } attr_id;
if (format.sel_id.attr_len == 0) {
attr_id.sel_id = GPU_vertformat_attr_add(&format.sel_id, "color", GPU_COMP_U32, 1, GPU_FETCH_INT);

View File

@@ -41,7 +41,7 @@
ARRAY_SET_ITEMS(v4, (float)r / 255.0f, (float)g / 255.0f, (float)b / 255.0f, (float)a / 255.0f)
/* Colors & Constant */
struct DRW_Global G_draw = {0};
struct DRW_Global G_draw = {{{0}}};
static bool weight_ramp_custom = false;
static ColorBand weight_ramp_copy;

View File

@@ -86,7 +86,7 @@ typedef struct EDIT_CURVE_Shaders {
static struct {
EDIT_CURVE_Shaders sh_data[GPU_SHADER_CFG_LEN];
} e_data = {NULL}; /* Engine data */
} e_data = {{{NULL}}}; /* Engine data */
typedef struct EDIT_CURVE_PrivateData {
/* resulting curve as 'wire' for curves (and optionally normals) */

View File

@@ -99,7 +99,7 @@ static struct {
EDIT_LATTICE_Shaders sh_data[GPU_SHADER_CFG_LEN];
} e_data = {NULL}; /* Engine data */
} e_data = {{{NULL}}}; /* Engine data */
typedef struct EDIT_LATTICE_PrivateData {
/* This keeps the references of the shading groups for

View File

@@ -122,7 +122,7 @@ static struct {
/* temp buffer texture */
struct GPUTexture *occlude_wire_depth_tx;
struct GPUTexture *occlude_wire_color_tx;
} e_data = {NULL}; /* Engine data */
} e_data = {{{NULL}}}; /* Engine data */
typedef struct EDIT_MESH_PrivateData {
/* weight */

View File

@@ -82,7 +82,7 @@ typedef struct OVERLAY_Shaders {
/* *********** STATIC *********** */
static struct {
OVERLAY_Shaders sh_data[GPU_SHADER_CFG_LEN];
} e_data = {NULL};
} e_data = {{{NULL}}};
/* Shaders */
extern char datatoc_overlay_face_orientation_frag_glsl[];

View File

@@ -376,8 +376,8 @@ void Strip::cleanUpSingularities (const vector<StrokeVertex*>& iStrokeVertices)
if (iStrokeVertices.size() < 2)
return;
int i = 0, j;
vector<StrokeVertex *>::const_iterator v, vend, v2, vPrev;
StrokeVertex *sv, *sv2; //soc unused - *svPrev;
vector<StrokeVertex *>::const_iterator v, vend, v2;
StrokeVertex *sv, *sv2;
bool singu1 = false, singu2 = false;
int timeSinceSingu1 = 0, timeSinceSingu2 = 0;

View File

@@ -184,7 +184,7 @@ const struct GPUShaderConfigData GPU_shader_cfg_data[GPU_SHADER_CFG_LEN] = {
};
/* cache of built-in shaders (each is created on first use) */
static GPUShader *builtin_shaders[GPU_SHADER_CFG_LEN][GPU_SHADER_BUILTIN_LEN] = {NULL};
static GPUShader *builtin_shaders[GPU_SHADER_CFG_LEN][GPU_SHADER_BUILTIN_LEN] = {{NULL}};
#ifndef NDEBUG
static uint g_shaderid = 0;
@@ -570,7 +570,7 @@ static const char *string_join_array_maybe_alloc(const char **str_arr, bool *r_i
struct GPUShader *GPU_shader_create_from_arrays_impl(
const struct GPU_ShaderCreateFromArray_Params *params)
{
struct { const char *str; bool is_alloc;} str_dst[4] = {0};
struct { const char *str; bool is_alloc;} str_dst[4] = {{0}};
const char **str_src[4] = {params->vert, params->frag, params->geom, params->defs};
for (int i = 0; i < ARRAY_SIZE(str_src); i++) {