Silent some warnings (the one in bmesh_operator.c was even preventing build in -Werro...
authorBastien Montagne <montagne29@wanadoo.fr>
Sun, 2 Dec 2012 13:35:33 +0000 (13:35 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Sun, 2 Dec 2012 13:35:33 +0000 (13:35 +0000)
intern/ghost/intern/GHOST_NDOFManagerX11.cpp
source/blender/bmesh/intern/bmesh_operators.c
source/blender/collada/TransformReader.cpp

index 49e7def87307ccbcb0d49da34c38e48d92564615..468a37de63331603c998bc5b5315292269e0760d 100644 (file)
@@ -90,8 +90,8 @@ bool GHOST_NDOFManagerX11::processEvents()
                                case SPNAV_EVENT_MOTION:
                                {
                                        /* convert to blender view coords */
-                                       short t[3] = {e.motion.x, e.motion.y, -e.motion.z};
-                                       short r[3] = {-e.motion.rx, -e.motion.ry, e.motion.rz};
+                                       short t[3] = {(short)e.motion.x, (short)e.motion.y, (short)-e.motion.z};
+                                       short r[3] = {(short)-e.motion.rx, (short)-e.motion.ry, (short)e.motion.rz};
 
                                        updateTranslation(t, now);
                                        updateRotation(r, now);
index ba38f230f0b5d5ae0c286aa70445a20230bc0273..baec0b7745d85da15cbc4ed6489c308616cb6adf 100644 (file)
@@ -256,7 +256,7 @@ BMOpSlot *BMO_slot_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identif
        if (UNLIKELY(slot_code < 0)) {
                //return &BMOpEmptySlot;
                BLI_assert(0);
-               NULL;  /* better crash */
+               return NULL;  /* better crash */
        }
 
        return &slot_args[slot_code];
index d10cd7378e98b7fe6a1e6a508a2c9dcc6954ae8e..617935894220d327f6f435e4597bba717d26757e 100644 (file)
@@ -84,7 +84,7 @@ void TransformReader::dae_rotate_to_mat4(COLLADAFW::Transformation *tm, float m[
        COLLADAFW::Rotate *ro = (COLLADAFW::Rotate *)tm;
        COLLADABU::Math::Vector3& axis = ro->getRotationAxis();
        const float angle = (float)DEG2RAD(ro->getRotationAngle());
-       const float ax[] = {axis[0], axis[1], axis[2]};
+       const float ax[] = {(float)axis[0], (float)axis[1], (float)axis[2]};
        // float quat[4];
        // axis_angle_to_quat(quat, axis, angle);
        // quat_to_mat4(m, quat);