From 76d0ab9750b04971fe7598011609faea2b4f7f62 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 12 Aug 2017 14:07:37 +0200 Subject: Code cleanup: fix various compiler warnings. --- source/blender/draw/intern/draw_cache_impl_mesh.c | 2 +- source/blender/gpu/GPU_uniformbuffer.h | 1 - source/blender/gpu/intern/gpu_uniformbuffer.c | 8 ++++---- source/blender/makesrna/intern/rna_wm_manipulator_api.c | 6 +++--- source/blender/windowmanager/manipulators/WM_manipulator_types.h | 3 --- 5 files changed, 8 insertions(+), 12 deletions(-) (limited to 'source') diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index f48d739f11b..40ba86d99ff 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -245,7 +245,7 @@ static void mesh_cd_calc_used_gpu_layers( struct GPUMaterial **gpumat_array, int gpumat_array_len) { /* See: DM_vertex_attributes_from_gpu for similar logic */ - GPUVertexAttribs gattribs = {0}; + GPUVertexAttribs gattribs = {{{0}}}; for (int i = 0; i < gpumat_array_len; i++) { GPUMaterial *gpumat = gpumat_array[i]; diff --git a/source/blender/gpu/GPU_uniformbuffer.h b/source/blender/gpu/GPU_uniformbuffer.h index e342078d8fd..57c4612c865 100644 --- a/source/blender/gpu/GPU_uniformbuffer.h +++ b/source/blender/gpu/GPU_uniformbuffer.h @@ -32,7 +32,6 @@ #ifndef __GPU_UNIFORMBUFFER_H__ #define __GPU_UNIFORMBUFFER_H__ -typedef enum GPUType GPUType; struct ListBase; typedef struct GPUUniformBuffer GPUUniformBuffer; diff --git a/source/blender/gpu/intern/gpu_uniformbuffer.c b/source/blender/gpu/intern/gpu_uniformbuffer.c index e3072d729c3..9e786844270 100644 --- a/source/blender/gpu/intern/gpu_uniformbuffer.c +++ b/source/blender/gpu/intern/gpu_uniformbuffer.c @@ -51,12 +51,12 @@ typedef enum GPUUniformBufferType { GPU_UBO_DYNAMIC = 1, } GPUUniformBufferType; -typedef struct GPUUniformBuffer { +struct GPUUniformBuffer { int size; /* in bytes */ GLuint bindcode; /* opengl identifier for UBO */ int bindpoint; /* current binding point */ GPUUniformBufferType type; -} GPUUniformBuffer; +}; #define GPUUniformBufferStatic GPUUniformBuffer @@ -67,12 +67,12 @@ typedef struct GPUUniformBufferDynamic { char flag; } GPUUniformBufferDynamic; -typedef struct GPUUniformBufferDynamicItem { +struct GPUUniformBufferDynamicItem { struct GPUUniformBufferDynamicItem *next, *prev; GPUType gputype; float *data; int size; -} GPUUniformBufferDynamicItem; +}; /* Prototypes */ diff --git a/source/blender/makesrna/intern/rna_wm_manipulator_api.c b/source/blender/makesrna/intern/rna_wm_manipulator_api.c index 7c805512e0b..f40a2208cf9 100644 --- a/source/blender/makesrna/intern/rna_wm_manipulator_api.c +++ b/source/blender/makesrna/intern/rna_wm_manipulator_api.c @@ -178,7 +178,7 @@ void RNA_api_manipulator(StructRNA *srna) func = RNA_def_function(srna, "draw_preset_box", "rna_manipulator_draw_preset_box"); RNA_def_function_ui_description(func, "Draw a box"); parm = RNA_def_property(func, "matrix", PROP_FLOAT, PROP_MATRIX); - RNA_def_property_flag(parm, PARM_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_def_property_multi_array(parm, 2, rna_matrix_dimsize_4x4); RNA_def_property_ui_text(parm, "", "The matrix to transform"); RNA_def_int(func, "select_id", -1, -1, INT_MAX, "Zero when not selecting", "", -1, INT_MAX); @@ -187,7 +187,7 @@ void RNA_api_manipulator(StructRNA *srna) func = RNA_def_function(srna, "draw_preset_arrow", "rna_manipulator_draw_preset_arrow"); RNA_def_function_ui_description(func, "Draw a box"); parm = RNA_def_property(func, "matrix", PROP_FLOAT, PROP_MATRIX); - RNA_def_property_flag(parm, PARM_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_def_property_multi_array(parm, 2, rna_matrix_dimsize_4x4); RNA_def_property_ui_text(parm, "", "The matrix to transform"); RNA_def_enum(func, "axis", rna_enum_object_axis_items, 2, "", "Arrow Orientation"); @@ -196,7 +196,7 @@ void RNA_api_manipulator(StructRNA *srna) func = RNA_def_function(srna, "draw_preset_circle", "rna_manipulator_draw_preset_circle"); RNA_def_function_ui_description(func, "Draw a box"); parm = RNA_def_property(func, "matrix", PROP_FLOAT, PROP_MATRIX); - RNA_def_property_flag(parm, PARM_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_def_property_multi_array(parm, 2, rna_matrix_dimsize_4x4); RNA_def_property_ui_text(parm, "", "The matrix to transform"); RNA_def_enum(func, "axis", rna_enum_object_axis_items, 2, "", "Arrow Orientation"); diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_types.h b/source/blender/windowmanager/manipulators/WM_manipulator_types.h index 8346bf24fd1..7bfc08c7caa 100644 --- a/source/blender/windowmanager/manipulators/WM_manipulator_types.h +++ b/source/blender/windowmanager/manipulators/WM_manipulator_types.h @@ -196,9 +196,6 @@ struct wmManipulator { /* over alloc target_properties after 'wmManipulatorType.struct_size' */ }; -typedef void (*wmManipulatorGroupFnInit)( - const struct bContext *, struct wmManipulatorGroup *); - /* Similar to PropertyElemRNA, but has an identifier. */ typedef struct wmManipulatorProperty { const struct wmManipulatorPropertyType *type; -- cgit v1.2.3