[Bf-blender-cvs] [4539c7cc578] master: Cleanup: silence Warnings

Germano Cavalcante noreply at git.blender.org
Wed Oct 20 15:04:16 CEST 2021


Commit: 4539c7cc5786c20aa52e046739e39ce67c8b2a17
Author: Germano Cavalcante
Date:   Wed Oct 20 10:03:46 2021 -0300
Branches: master
https://developer.blender.org/rB4539c7cc5786c20aa52e046739e39ce67c8b2a17

Cleanup: silence Warnings

Warning	C4100 unreferenced formal parameter
Warning	C4242 conversion from 'int' to 'short', possible loss of data

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

M	source/blender/editors/space_view3d/view3d_cursor_snap.c
M	source/blender/editors/space_view3d/view3d_placement.c

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

diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c
index 4457afcb67f..52b9f468ca0 100644
--- a/source/blender/editors/space_view3d/view3d_cursor_snap.c
+++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c
@@ -235,7 +235,7 @@ static void v3d_cursor_plane_draw_grid(const int resolution,
       i += 1;
     }
   }
-  BLI_assert(i == coords_len);
+  BLI_assert(i == (int)coords_len);
   immBeginAtMost(GPU_PRIM_LINES, coords_len * 4);
   i = 0;
   for (int x = 0; x < resolution_min; x++) {
@@ -661,7 +661,7 @@ static void v3d_cursor_snap_update(V3DSnapCursorState *state,
     else {
       ViewLayer *view_layer = CTX_data_view_layer(C);
       Object *ob = OBACT(view_layer);
-      const short orient_index = BKE_scene_orientation_get_index(scene, SCE_ORIENT_DEFAULT);
+      const int orient_index = BKE_scene_orientation_get_index(scene, SCE_ORIENT_DEFAULT);
       const int pivot_point = scene->toolsettings->transform_pivot_point;
       ED_transform_calc_orientation_from_type_ex(
           scene, view_layer, v3d, region->regiondata, ob, ob, orient_index, pivot_point, omat);
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c
index 09d3aa31811..b6444ebb29b 100644
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@ -1259,7 +1259,7 @@ static void idp_rna_plane_axis_set_fn(struct PointerRNA *UNUSED(ptr),
                                       int value)
 {
   V3DSnapCursorState *snap_state = ED_view3d_cursor_snap_state_get();
-  snap_state->plane_axis = value;
+  snap_state->plane_axis = (short)value;
   ED_view3d_cursor_snap_state_default_set(snap_state);
 }



More information about the Bf-blender-cvs mailing list