[Bf-blender-cvs] [3b785be8f42] blender2.8: Cleanup: warning, use STRNCPY macro

Campbell Barton noreply at git.blender.org
Sun Apr 29 14:48:47 CEST 2018


Commit: 3b785be8f42c8e25639013391f33a587cbcc89ad
Author: Campbell Barton
Date:   Sun Apr 29 14:48:30 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB3b785be8f42c8e25639013391f33a587cbcc89ad

Cleanup: warning, use STRNCPY macro

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

M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/windowmanager/intern/wm_toolsystem.c

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

diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 50b2ac69b58..204d95b4569 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -957,10 +957,12 @@ static void rna_RenderSettings_stereoViews_begin(CollectionPropertyIterator *ite
 	rna_iterator_listbase_begin(iter, &rd->views, rna_RenderSettings_stereoViews_skip);
 }
 
+#if 0
 static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr))
 {
 	return BLI_sprintfN("render");
 }
+#endif
 
 static char *rna_BakeSettings_path(PointerRNA *UNUSED(ptr))
 {
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c
index 7934d238cfb..06380d6eb8e 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -99,9 +99,9 @@ void WM_toolsystem_set(bContext *C, const bToolDef *tool)
 	workspace->tool.spacetype = tool->spacetype;
 
 	if (&workspace->tool != tool) {
-		BLI_strncpy(workspace->tool.keymap, tool->keymap, sizeof(tool->keymap));
-		BLI_strncpy(workspace->tool.manipulator_group, tool->manipulator_group, sizeof(tool->manipulator_group));
-		BLI_strncpy(workspace->tool.data_block, tool->data_block, sizeof(tool->data_block));
+		STRNCPY(workspace->tool.keymap, tool->keymap);
+		STRNCPY(workspace->tool.manipulator_group, tool->manipulator_group);
+		STRNCPY(workspace->tool.data_block, tool->data_block);
 		workspace->tool.spacetype = tool->spacetype;
 	}



More information about the Bf-blender-cvs mailing list