Commit: 5869bf5002f6bb370ef62da62d8cf7d56178b663
Author: Brecht Van Lommel
Date:   Thu Oct 18 12:19:06 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB5869bf5002f6bb370ef62da62d8cf7d56178b663

Cleanup: fix compiler warnings.

===================================================================

M       source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
M       source/blender/editors/transform/transform_gizmo_3d.c
M       source/blender/gpu/intern/gpu_draw.c

===================================================================

diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c 
b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
index 51a789fee66..c9404721b76 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
@@ -334,7 +334,7 @@ static void dial_ghostarc_draw_with_helplines(
 }
 
 static void dial_draw_intern(
-        const bContext *C, wmGizmo *gz,
+        wmGizmo *gz,
         const bool select, const bool highlight, float clip_plane[4])
 {
        float matrix_final[4][4];
@@ -403,7 +403,7 @@ static void gizmo_dial_draw_select(const bContext *C, 
wmGizmo *gz, int select_id
        }
 
        GPU_select_load_id(select_id);
-       dial_draw_intern(C, gz, true, false, clip_plane);
+       dial_draw_intern(gz, true, false, clip_plane);
 
        if (clip_plane) {
                glDisable(GL_CLIP_DISTANCE0);
@@ -428,7 +428,7 @@ static void gizmo_dial_draw(const bContext *C, wmGizmo *gz)
        }
 
        GPU_blend(true);
-       dial_draw_intern(C, gz, false, is_highlight, clip_plane);
+       dial_draw_intern(gz, false, is_highlight, clip_plane);
        GPU_blend(false);
 }
 
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c 
b/source/blender/editors/transform/transform_gizmo_3d.c
index 480fe3429e0..b2efdcf51cd 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1262,11 +1262,11 @@ void drawDial3d(const TransInfo *t)
                                axis_idx = MAN_AXIS_ROT_Y;
                                negate_v3_v3(mat_basis[2], tc->mtx[1]);
                        }
-                       else if (tc->mode &  CON_AXIS2) {
+                       else {
+                               BLI_assert((tc->mode & CON_AXIS2) != 0);
                                axis_idx = MAN_AXIS_ROT_Z;
                                negate_v3_v3(mat_basis[2], tc->mtx[2]);
                        }
-                       else BLI_assert(0);
                }
                else {
                        axis_idx = MAN_AXIS_ROT_C;
diff --git a/source/blender/gpu/intern/gpu_draw.c 
b/source/blender/gpu/intern/gpu_draw.c
index 685b929ac93..41780033011 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1028,7 +1028,7 @@ static GPUTexture 
*create_density_texture(SmokeDomainSettings *sds, int highres)
 
        GPUTexture *tex = GPU_texture_create_nD(
                       dim[0], dim[1], dim[2], 3,
-                      (data) ? data : source,
+                      (has_color) ? data : source,
                       format, GPU_DATA_FLOAT, 0, true, NULL);
        if (data) {
                MEM_freeN(data);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to