[Bf-blender-cvs] [c18055ba5c8] master: Cleanup: quiet warning

Jacques Lucke noreply at git.blender.org
Sat Dec 17 11:51:24 CET 2022


Commit: c18055ba5c81af73f83d5a2ac410f7df5412754e
Author: Jacques Lucke
Date:   Sat Dec 17 11:51:12 2022 +0100
Branches: master
https://developer.blender.org/rBc18055ba5c81af73f83d5a2ac410f7df5412754e

Cleanup: quiet warning

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

M	source/blender/editors/armature/armature_edit.c

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

diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 780e2fae00e..3c0617a1dfc 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -394,7 +394,8 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
           vec[type] = 1.0f;
         }
         else {
-          vec[type - 2] = -1.0f;
+          /* Use casting to quiet -Warray-bounds warning in gcc. */
+          vec[(int)type - 2] = -1.0f;
         }
         mul_m3_v3(imat, vec);
         normalize_v3(vec);



More information about the Bf-blender-cvs mailing list