Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-16 21:48:28 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-16 22:21:16 +0300
commitb9af4efe41712680d554a389d771e83c66fce5c4 (patch)
treef9d674783ad32b3c7dafe7916d9937bd1dbdab73
parentad390f514bfa33abadfd09e8fd673a0cfee68b39 (diff)
Cleanup: fix compiler warnings.
-rw-r--r--intern/cycles/device/device_multi.cpp1
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_rna.h2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h2
-rw-r--r--source/blender/draw/engines/basic/basic_engine.c2
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c2
-rw-r--r--source/blender/draw/intern/draw_common.c2
-rw-r--r--source/blender/draw/modes/edit_curve_mode.c2
-rw-r--r--source/blender/draw/modes/edit_lattice_mode.c2
-rw-r--r--source/blender/draw/modes/edit_mesh_mode.c2
-rw-r--r--source/blender/draw/modes/overlay_mode.c2
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRep.cpp4
-rw-r--r--source/blender/gpu/intern/gpu_shader.c4
13 files changed, 15 insertions, 14 deletions
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index efb4d9dd288..bdb7c87fa57 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -145,6 +145,7 @@ public:
return subresult;
case DEVICE_KERNEL_USING_FEATURE_KERNEL:
+ case DEVICE_KERNEL_UNKNOWN:
break;
}
}
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.h b/source/blender/depsgraph/intern/builder/deg_builder_rna.h
index a328124d6ec..5e121476087 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_rna.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.h
@@ -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
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 6e2b401a09e..cf36892d9e6 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -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:
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
index c6d44382cc7..6f9141a7c19 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
@@ -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
diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c
index b851a0c4df5..1e8b529c23f 100644
--- a/source/blender/draw/engines/basic/basic_engine.c
+++ b/source/blender/draw/engines/basic/basic_engine.c
@@ -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;
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 890181a532a..7c1ef09aaa7 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -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);
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c
index 849087d39af..2d1316f9406 100644
--- a/source/blender/draw/intern/draw_common.c
+++ b/source/blender/draw/intern/draw_common.c
@@ -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;
diff --git a/source/blender/draw/modes/edit_curve_mode.c b/source/blender/draw/modes/edit_curve_mode.c
index c2841549270..3e6f95f2be9 100644
--- a/source/blender/draw/modes/edit_curve_mode.c
+++ b/source/blender/draw/modes/edit_curve_mode.c
@@ -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) */
diff --git a/source/blender/draw/modes/edit_lattice_mode.c b/source/blender/draw/modes/edit_lattice_mode.c
index 70870292556..9ea76deed3a 100644
--- a/source/blender/draw/modes/edit_lattice_mode.c
+++ b/source/blender/draw/modes/edit_lattice_mode.c
@@ -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
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c
index 5ba25b16412..4256746aca1 100644
--- a/source/blender/draw/modes/edit_mesh_mode.c
+++ b/source/blender/draw/modes/edit_mesh_mode.c
@@ -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 */
diff --git a/source/blender/draw/modes/overlay_mode.c b/source/blender/draw/modes/overlay_mode.c
index a2dca50a600..6dacf27ee98 100644
--- a/source/blender/draw/modes/overlay_mode.c
+++ b/source/blender/draw/modes/overlay_mode.c
@@ -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[];
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index 7298c3d9355..9a593c93b08 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -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;
diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c
index be82d3d5d99..21807e07643 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -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++) {