Code cleanup: fix a few harmless warnings.

This commit is contained in:
2018-02-28 02:36:45 +01:00
parent 2329cc09e6
commit c9a2927930
5 changed files with 7 additions and 8 deletions

View File

@@ -465,8 +465,7 @@ static void drw_interface_batching_init(
case DRW_SHG_POINT_BATCH: type = GWN_PRIM_POINTS; break; case DRW_SHG_POINT_BATCH: type = GWN_PRIM_POINTS; break;
case DRW_SHG_LINE_BATCH: type = GWN_PRIM_LINES; break; case DRW_SHG_LINE_BATCH: type = GWN_PRIM_LINES; break;
case DRW_SHG_TRIANGLE_BATCH: type = GWN_PRIM_TRIS; break; case DRW_SHG_TRIANGLE_BATCH: type = GWN_PRIM_TRIS; break;
default: default: type = GWN_PRIM_NONE; BLI_assert(0); break;
BLI_assert(0);
} }
DRW_batching_buffer_request(DST.idatalist, format, type, shgroup, DRW_batching_buffer_request(DST.idatalist, format, type, shgroup,

View File

@@ -656,7 +656,7 @@ static int object_add_to_new_collection_exec(bContext *C, wmOperator *op)
SceneCollection *scene_collection_parent, *scene_collection_new; SceneCollection *scene_collection_parent, *scene_collection_new;
TreeElement *te_active, *te_parent; 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); outliner_tree_traverse(soops, &soops->tree, 0, TSE_HIGHLIGHTED, outliner_find_selected_objects, &active);
if (BLI_listbase_is_empty(&active.objects_selected_array)) { if (BLI_listbase_is_empty(&active.objects_selected_array)) {

View File

@@ -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! */ * 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); ViewRender *view_render = BKE_viewrender_get(scene, workspace);
wmMsgParams_RNA msg_key_params = {0}; wmMsgParams_RNA msg_key_params = {{{0}}};
/* Only subscribe to types. */ /* Only subscribe to types. */
StructRNA *type_array[] = { StructRNA *type_array[] = {

View File

@@ -117,7 +117,7 @@ static int bpygwn_ParseVertFetchMode(PyObject *o, void *p)
} \ } \
} ((void)0) } ((void)0)
Gwn_VertCompType mode; Gwn_VertFetchMode mode;
MATCH_ID(FLOAT); MATCH_ID(FLOAT);
MATCH_ID(INT); MATCH_ID(INT);
MATCH_ID(INT_TO_FLOAT_UNIT); MATCH_ID(INT_TO_FLOAT_UNIT);
@@ -168,7 +168,7 @@ static int bpygwn_ParsePrimType(PyObject *o, void *p)
return 0; return 0;
success: success:
(*(Gwn_VertFetchMode *)p) = mode; (*(Gwn_PrimType *)p) = mode;
return 1; return 1;
} }

View File

@@ -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. */ /* Note: we may want to have a way to pass this in. */
bContext *C = (bContext *)BPy_GetContext(); bContext *C = (bContext *)BPy_GetContext();
struct wmMsgBus *mbus = CTX_wm_message_bus(C); 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}; 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. */ /* Note: we may want to have a way to pass this in. */
bContext *C = (bContext *)BPy_GetContext(); bContext *C = (bContext *)BPy_GetContext();
struct wmMsgBus *mbus = CTX_wm_message_bus(C); 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) { if (py_msgbus_rna_key_from_py(py_sub, &msg_key_params, error_prefix) == -1) {
return NULL; return NULL;