[Bf-blender-cvs] [c9a29279301] blender2.8: Code cleanup: fix a few harmless warnings.
Brecht Van Lommel
noreply at git.blender.org
Wed Feb 28 03:12:02 CET 2018
Commit: c9a292793011cc813f20bcae0225a13cc82bdea4
Author: Brecht Van Lommel
Date: Wed Feb 28 02:36:45 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBc9a292793011cc813f20bcae0225a13cc82bdea4
Code cleanup: fix a few harmless warnings.
===================================================================
M source/blender/draw/intern/draw_manager_data.c
M source/blender/editors/space_outliner/outliner_collections.c
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/python/gawain/gwn_py_types.c
M source/blender/python/intern/bpy_msgbus.c
===================================================================
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index f8d4cb6655f..20a859d48e2 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -465,8 +465,7 @@ static void drw_interface_batching_init(
case DRW_SHG_POINT_BATCH: type = GWN_PRIM_POINTS; break;
case DRW_SHG_LINE_BATCH: type = GWN_PRIM_LINES; break;
case DRW_SHG_TRIANGLE_BATCH: type = GWN_PRIM_TRIS; break;
- default:
- BLI_assert(0);
+ default: type = GWN_PRIM_NONE; BLI_assert(0); break;
}
DRW_batching_buffer_request(DST.idatalist, format, type, shgroup,
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index efc28eea917..7c3bccd1385 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -656,7 +656,7 @@ static int object_add_to_new_collection_exec(bContext *C, wmOperator *op)
SceneCollection *scene_collection_parent, *scene_collection_new;
TreeElement *te_active, *te_parent;
- struct ObjectsSelectedData data = {NULL}, active = {NULL};
+ struct ObjectsSelectedData data = {{NULL}}, active = {{NULL}};
outliner_tree_traverse(soops, &soops->tree, 0, TSE_HIGHLIGHTED, outliner_find_selected_objects, &active);
if (BLI_listbase_is_empty(&active.objects_selected_array)) {
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 7d29d6ad9b2..89e84052c9b 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1072,7 +1072,7 @@ static void view3d_main_region_message_subscribe(
*
* For other space types we might try avoid this, keep the 3D view as an exceptional case! */
ViewRender *view_render = BKE_viewrender_get(scene, workspace);
- wmMsgParams_RNA msg_key_params = {0};
+ wmMsgParams_RNA msg_key_params = {{{0}}};
/* Only subscribe to types. */
StructRNA *type_array[] = {
diff --git a/source/blender/python/gawain/gwn_py_types.c b/source/blender/python/gawain/gwn_py_types.c
index 4f6b354b7be..3146993d665 100644
--- a/source/blender/python/gawain/gwn_py_types.c
+++ b/source/blender/python/gawain/gwn_py_types.c
@@ -117,7 +117,7 @@ static int bpygwn_ParseVertFetchMode(PyObject *o, void *p)
} \
} ((void)0)
- Gwn_VertCompType mode;
+ Gwn_VertFetchMode mode;
MATCH_ID(FLOAT);
MATCH_ID(INT);
MATCH_ID(INT_TO_FLOAT_UNIT);
@@ -168,7 +168,7 @@ static int bpygwn_ParsePrimType(PyObject *o, void *p)
return 0;
success:
- (*(Gwn_VertFetchMode *)p) = mode;
+ (*(Gwn_PrimType *)p) = mode;
return 1;
}
diff --git a/source/blender/python/intern/bpy_msgbus.c b/source/blender/python/intern/bpy_msgbus.c
index 945d2a9b6cc..941d6b760dc 100644
--- a/source/blender/python/intern/bpy_msgbus.c
+++ b/source/blender/python/intern/bpy_msgbus.c
@@ -273,7 +273,7 @@ static PyObject *bpy_msgbus_subscribe_rna(PyObject *UNUSED(self), PyObject *args
/* Note: we may want to have a way to pass this in. */
bContext *C = (bContext *)BPy_GetContext();
struct wmMsgBus *mbus = CTX_wm_message_bus(C);
- wmMsgParams_RNA msg_key_params = {0};
+ wmMsgParams_RNA msg_key_params = {{{0}}};
wmMsgSubscribeValue msg_val_params = {0};
@@ -349,7 +349,7 @@ static PyObject *bpy_msgbus_publish_rna(PyObject *UNUSED(self), PyObject *args,
/* Note: we may want to have a way to pass this in. */
bContext *C = (bContext *)BPy_GetContext();
struct wmMsgBus *mbus = CTX_wm_message_bus(C);
- wmMsgParams_RNA msg_key_params = {0};
+ wmMsgParams_RNA msg_key_params = {{{0}}};
if (py_msgbus_rna_key_from_py(py_sub, &msg_key_params, error_prefix) == -1) {
return NULL;
More information about the Bf-blender-cvs
mailing list