Code cleanup: fix various compiler warnings.

This commit is contained in:
Brecht Van Lommel 2017-08-12 14:07:37 +02:00
parent f1a14740ba
commit 76d0ab9750
9 changed files with 9 additions and 19 deletions

@ -57,7 +57,6 @@ GHOST_ContextGLX::GHOST_ContextGLX(
GHOST_TUns16 numOfAASamples,
Window window,
Display *display,
XVisualInfo *visualInfo,
GLXFBConfig fbconfig,
int contextProfileMask,
int contextMajorVersion,
@ -66,7 +65,6 @@ GHOST_ContextGLX::GHOST_ContextGLX(
int contextResetNotificationStrategy)
: GHOST_Context(stereoVisual, numOfAASamples),
m_display(display),
m_visualInfo(visualInfo),
m_fbconfig(fbconfig),
m_window(window),
m_contextProfileMask(contextProfileMask),

@ -57,7 +57,6 @@ public:
GHOST_TUns16 numOfAASamples,
Window window,
Display *display,
XVisualInfo *visualInfo,
GLXFBConfig fbconfig,
int contextProfileMask,
int contextMajorVersion,
@ -113,7 +112,6 @@ private:
void initContextGLXEW();
Display *m_display;
XVisualInfo *m_visualInfo;
GLXFBConfig m_fbconfig;
Window m_window;

@ -1356,7 +1356,6 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type
m_wantNumOfAASamples,
m_window,
m_display,
m_visualInfo,
(GLXFBConfig)m_fbconfig,
profile_mask,
4, minor,
@ -1374,7 +1373,6 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type
m_wantNumOfAASamples,
m_window,
m_display,
m_visualInfo,
(GLXFBConfig)m_fbconfig,
profile_mask,
3, 3,

@ -616,7 +616,7 @@ static GLuint prepare_patchDraw(OpenSubdiv_GLMesh *gl_mesh,
if (fill_quads) {
int model;
GLboolean use_texture_2d, use_lighting;
GLboolean use_texture_2d;
glGetIntegerv(GL_SHADE_MODEL, &model);
glGetBooleanv(GL_TEXTURE_2D, &use_texture_2d);

@ -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];

@ -32,7 +32,6 @@
#ifndef __GPU_UNIFORMBUFFER_H__
#define __GPU_UNIFORMBUFFER_H__
typedef enum GPUType GPUType;
struct ListBase;
typedef struct GPUUniformBuffer GPUUniformBuffer;

@ -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 */

@ -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");

@ -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;