Code cleanup: fix various compiler warnings.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 12 Aug 2017 12:07:37 +0000 (14:07 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 12 Aug 2017 12:08:03 +0000 (14:08 +0200)
intern/ghost/intern/GHOST_ContextGLX.cpp
intern/ghost/intern/GHOST_ContextGLX.h
intern/ghost/intern/GHOST_WindowX11.cpp
intern/opensubdiv/opensubdiv_gpu_capi.cc
source/blender/draw/intern/draw_cache_impl_mesh.c
source/blender/gpu/GPU_uniformbuffer.h
source/blender/gpu/intern/gpu_uniformbuffer.c
source/blender/makesrna/intern/rna_wm_manipulator_api.c
source/blender/windowmanager/manipulators/WM_manipulator_types.h

index 0a9dc900aed28d70871aa62bcfff567e926c42c2..061ac29945bca238fe11c43173111da3f3fe4070 100644 (file)
@@ -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),
index 6547a0bd00a9bf60928e74991fb63d186499b6b0..51fb1dd57dc2f45888cbee0f1d34d75814172d0a 100644 (file)
@@ -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;
 
index 450fe5688145535dbe3cc26ae6de15d30da7d7b9..12355cb6aab9a5835c74a95417342a0886a66e0c 100644 (file)
@@ -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,
index 811cd18745e29f36984f5fa79b60b768f7366801..7d8085c1ff533b005df56200451d7f42d1569d0e 100644 (file)
@@ -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);
 
index f48d739f11ba0cd67bc11face8d27f9fbae4c910..40ba86d99ffb983b2a69dc99ffb2c5f5f1c7fa9f 100644 (file)
@@ -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];
index e342078d8fd774f0f74b8252de81846b78e1b9f2..57c4612c8653a3a75d02307e703ba18e9cba1b0a 100644 (file)
@@ -32,7 +32,6 @@
 #ifndef __GPU_UNIFORMBUFFER_H__
 #define __GPU_UNIFORMBUFFER_H__
 
-typedef enum GPUType GPUType;
 struct ListBase;
 
 typedef struct GPUUniformBuffer GPUUniformBuffer;
index e3072d729c364ce95629e710ef312e49652bcc0a..9e786844270e58f5406a6a986fbb632924596166 100644 (file)
@@ -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 */
index 7c805512e0b1d133727880e5dac4a78df7eb282d..f40a2208cf957fe7e00400c735740ffd4fbe7414 100644 (file)
@@ -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");
index 8346bf24fd16173328b9b0749c547f5f7bea837b..7bfc08c7caa10a553b7bedd437cdd7627d44851e 100644 (file)
@@ -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;