[Bf-blender-cvs] [a4f5561] master: Cleanup: quiet int overflow warnings
Campbell Barton
noreply at git.blender.org
Sun Aug 2 06:00:13 CEST 2015
Commit: a4f55617d1ae803efa7266ae0a3746b79dfb1f3a
Author: Campbell Barton
Date: Sun Aug 2 12:53:12 2015 +1000
Branches: master
https://developer.blender.org/rBa4f55617d1ae803efa7266ae0a3746b79dfb1f3a
Cleanup: quiet int overflow warnings
===================================================================
M source/blender/python/mathutils/mathutils.c
M source/blender/python/mathutils/mathutils.h
===================================================================
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index ec249e8..16d8d64 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -113,7 +113,7 @@ Py_hash_t mathutils_array_hash(const float *array, size_t array_len)
/* helper function returns length of the 'value', -1 on error */
int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *value, const char *error_prefix)
{
- const int flag = array_max;
+ const unsigned int flag = array_max;
int size;
array_max &= ~MU_ARRAY_FLAGS;
diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h
index e653b45..80130e6 100644
--- a/source/blender/python/mathutils/mathutils.h
+++ b/source/blender/python/mathutils/mathutils.h
@@ -147,10 +147,10 @@ int mathutils_any_to_rotmat(float rmat[3][3], PyObject *value, const char *error
Py_hash_t mathutils_array_hash(const float *float_array, size_t array_len);
/* zero remaining unused elements of the array */
-#define MU_ARRAY_ZERO (1 << 30)
+#define MU_ARRAY_ZERO (1u << 30)
/* ignore larger py sequences than requested (just use first elements),
* handy when using 3d vectors as 2d */
-#define MU_ARRAY_SPILL (1 << 31)
+#define MU_ARRAY_SPILL (1u << 31)
#define MU_ARRAY_FLAGS (MU_ARRAY_ZERO | MU_ARRAY_SPILL)
More information about the Bf-blender-cvs
mailing list