[Bf-blender-cvs] [c034a25] master: Code cleanup: quiet warnings
Campbell Barton
noreply at git.blender.org
Tue Apr 29 14:40:41 CEST 2014
Commit: c034a252bb08be3879ee14e7c0db2204e03d4817
Author: Campbell Barton
Date: Tue Apr 29 22:37:05 2014 +1000
https://developer.blender.org/rBc034a252bb08be3879ee14e7c0db2204e03d4817
Code cleanup: quiet warnings
===================================================================
M source/blender/editors/space_node/node_relationships.c
M source/blender/python/mathutils/mathutils_Matrix.c
===================================================================
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index e8c4f7f..54cde7f 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -404,7 +404,7 @@ static void node_link_update_header(bContext *C, bNodeLinkDrag *UNUSED(nldrag))
#define HEADER_LENGTH 256
char header[HEADER_LENGTH];
- BLI_snprintf(header, HEADER_LENGTH, IFACE_("LMB: drag node link, RMB: cancel"));
+ BLI_strncpy(header, IFACE_("LMB: drag node link, RMB: cancel"), HEADER_LENGTH);
ED_area_headerprint(CTX_wm_area(C), header);
#undef HEADER_LENGTH
}
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index baadd4d..6129bb8 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -1251,7 +1251,7 @@ static bool matrix_invert_args_check(const MatrixObject *self, PyObject *args, b
return true;
case 1:
if (check_type) {
- const MatrixObject *fallback = PyTuple_GET_ITEM(args, 0);
+ const MatrixObject *fallback = (MatrixObject *)PyTuple_GET_ITEM(args, 0);
if (!MatrixObject_Check(fallback)) {
PyErr_SetString(PyExc_TypeError,
"Matrix.invert: "
@@ -1314,7 +1314,7 @@ static PyObject *Matrix_invert(MatrixObject *self, PyObject *args)
}
else {
if (PyTuple_GET_SIZE(args) == 1) {
- MatrixObject *fallback = PyTuple_GET_ITEM(args, 0);
+ MatrixObject *fallback = (MatrixObject *)PyTuple_GET_ITEM(args, 0);
if (BaseMath_ReadCallback(fallback) == -1)
return NULL;
More information about the Bf-blender-cvs
mailing list