Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-16 18:10:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-17 14:00:31 +0300
commitc9d5d311ec52fccee1a1948810633d120351d9ce (patch)
tree4db88bdcb0e1764786748fde5c9e9ed04819bc4c /source
parent502aabb9d0c5b65614baf4d7785681f154abd77c (diff)
Cleanup: fix harmless compiler warnings.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_cache_utils.c2
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
index 4c427a672d2..8ae650a21eb 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -102,7 +102,7 @@ tGPencilObjectCache *gpencil_object_cache_add(
cache_elem->is_dup_ob = gpencil_check_ob_duplicated(cache_array, *gp_cache_used, ob);
- sprintf(cache_elem->ob_name, "%s", ob->id.name);
+ STRNCPY(cache_elem->ob_name, ob->id.name);
cache_elem->gpd = (bGPdata *)ob->data;
copy_v3_v3(cache_elem->loc, ob->loc);
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index f9908c5dbe6..03ed75d46a2 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1354,7 +1354,7 @@ static void gizmogroup_init_properties_from_twtype(wmGizmoGroup *gzgroup)
{
const short axis_type = gizmo_get_axis_type(axis_idx, man->axis_type_default);
bool constraint_axis[3] = {1, 0, 0};
- PointerRNA *ptr;
+ PointerRNA *ptr = NULL;
gizmo_get_axis_constraint(axis_idx, constraint_axis);
@@ -1455,14 +1455,14 @@ static void gizmogroup_init_properties_from_twtype(wmGizmoGroup *gzgroup)
}
}
- {
+ if (ptr) {
PropertyRNA *prop;
if ((prop = RNA_struct_find_property(ptr, "constraint_axis"))) {
RNA_property_boolean_set_array(ptr, prop, constraint_axis);
}
- }
- RNA_boolean_set(ptr, "release_confirm", 1);
+ RNA_boolean_set(ptr, "release_confirm", 1);
+ }
}
MAN_ITER_AXES_END;
}