diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-28 04:36:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-28 05:10:38 +0300 |
commit | c9a292793011cc813f20bcae0225a13cc82bdea4 (patch) | |
tree | 447cb9a4cf41893603da9189977a1ea188219caf /source | |
parent | 2329cc09e6aec1adf09db755b0912a79cb3ab63a (diff) |
Code cleanup: fix a few harmless warnings.
Diffstat (limited to 'source')
5 files changed, 7 insertions, 8 deletions
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; |