[Bf-blender-cvs] [702a2ba0ef9] master: Cleanup: quiet undeclared variable warnings

Campbell Barton noreply at git.blender.org
Sat Feb 23 09:39:57 CET 2019


Commit: 702a2ba0ef93f2f5a8544565b15c04dba73206c3
Author: Campbell Barton
Date:   Sat Feb 23 19:17:30 2019 +1100
Branches: master
https://developer.blender.org/rB702a2ba0ef93f2f5a8544565b15c04dba73206c3

Cleanup: quiet undeclared variable warnings

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

M	intern/clog/CLG_log.h
M	source/blender/blenkernel/BKE_material.h
M	source/blender/blenkernel/BKE_node.h
M	source/blender/blenkernel/intern/node.c
M	source/blender/editors/space_clip/space_clip.c
M	source/blender/editors/space_sequencer/space_sequencer.c
M	source/blender/nodes/composite/node_composite_tree.c

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

diff --git a/intern/clog/CLG_log.h b/intern/clog/CLG_log.h
index 810997ac78b..0cf1bda6625 100644
--- a/intern/clog/CLG_log.h
+++ b/intern/clog/CLG_log.h
@@ -148,6 +148,7 @@ void CLG_logref_init(CLG_LogRef *clg_ref);
 /** Declare outside function, declare as extern in header. */
 #define CLG_LOGREF_DECLARE_GLOBAL(var, id) \
 	static CLG_LogRef _static_ ## var = {id}; \
+	extern CLG_LogRef *var; \
 	CLG_LogRef *var = &_static_ ## var
 
 /** Initialize struct once. */
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 84df45dbf1d..1c171ef6e7c 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -107,6 +107,8 @@ struct Depsgraph;
 
 void BKE_material_eval(struct Depsgraph *depsgraph, struct Material *material);
 
+extern struct Material defmaterial;
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index f5b97a875e9..743efae9d16 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -1065,4 +1065,7 @@ void BKE_nodetree_shading_params_eval(struct Depsgraph *depsgraph,
                                       struct bNodeTree *ntree_dst,
                                       const struct bNodeTree *ntree_src);
 
+extern struct bNodeType NodeTypeUndefined;
+extern struct bNodeSocketType NodeSocketTypeUndefined;
+
 #endif  /* __BKE_NODE_H__ */
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 54440b40218..70e38e86c0c 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -73,7 +73,7 @@
 #define NODE_DEFAULT_MAX_WIDTH 700
 
 /* Fallback types for undefined tree, nodes, sockets */
-bNodeTreeType NodeTreeTypeUndefined;
+static bNodeTreeType NodeTreeTypeUndefined;
 bNodeType NodeTypeUndefined;
 bNodeSocketType NodeSocketTypeUndefined;
 
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index c773c6f85a0..b84a5fc90ed 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -554,6 +554,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
 }
 
 /* DO NOT make this static, this hides the symbol and breaks API generation script. */
+extern const char *clip_context_dir[];  /* quiet warning. */
 const char *clip_context_dir[] = {"edit_movieclip", "edit_mask", NULL};
 
 static int clip_context(const bContext *C, const char *member, bContextDataResult *result)
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index e1a917b4e38..4f174065cac 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -432,6 +432,7 @@ static void sequencer_dropboxes(void)
 /* ************* end drop *********** */
 
 /* DO NOT make this static, this hides the symbol and breaks API generation script. */
+extern const char *sequencer_context_dir[];  /* quiet warning. */
 const char *sequencer_context_dir[] = {"edit_mask", NULL};
 
 static int sequencer_context(const bContext *C, const char *member, bContextDataResult *result)
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c
index b5e1dc0b16a..e2cfb4cd24c 100644
--- a/source/blender/nodes/composite/node_composite_tree.c
+++ b/source/blender/nodes/composite/node_composite_tree.c
@@ -214,6 +214,7 @@ void register_node_tree_type_cmp(void)
 	ntreeTypeAdd(tt);
 }
 
+extern void *COM_linker_hack;  /* Quiet warning. */
 void *COM_linker_hack = NULL;
 
 void ntreeCompositExecTree(Scene *scene, bNodeTree *ntree, RenderData *rd, int rendering, int do_preview,



More information about the Bf-blender-cvs mailing list