[Bf-blender-cvs] [d09b1ff1a67] master: Cleanup: undeclared variable warnings
Campbell Barton
noreply at git.blender.org
Thu Aug 22 18:30:01 CEST 2019
Commit: d09b1ff1a674bdf3f85d419b15b5869ee9820221
Author: Campbell Barton
Date: Fri Aug 23 02:22:23 2019 +1000
Branches: master
https://developer.blender.org/rBd09b1ff1a674bdf3f85d419b15b5869ee9820221
Cleanup: undeclared variable warnings
Forward declare variables, or make them static.
===================================================================
M release/datafiles/userdef/userdef_default.c
M source/blender/draw/engines/eevee/eevee_lut.c
M source/blender/draw/intern/draw_cache_extract_mesh.c
M source/blender/makesrna/intern/rna_nodetree.c
===================================================================
diff --git a/release/datafiles/userdef/userdef_default.c b/release/datafiles/userdef/userdef_default.c
index 99c8cd72dba..4ad99993ada 100644
--- a/release/datafiles/userdef/userdef_default.c
+++ b/release/datafiles/userdef/userdef_default.c
@@ -26,6 +26,8 @@
#include "BKE_blender_version.h"
+#include "BLO_readfile.h" /* own include */
+
const UserDef U_default = {
.versionfile = BLENDER_VERSION,
.subversionfile = BLENDER_SUBVERSION,
diff --git a/source/blender/draw/engines/eevee/eevee_lut.c b/source/blender/draw/engines/eevee/eevee_lut.c
index 8db45e4cee6..b380269db99 100644
--- a/source/blender/draw/engines/eevee/eevee_lut.c
+++ b/source/blender/draw/engines/eevee/eevee_lut.c
@@ -21,6 +21,8 @@
* \ingroup gpu
*/
+#include "eevee_lut.h" /* own include */
+
const float ltc_mat_ggx[64 * 64 * 4] = {
1.000000, 0.000000, 0.000000, 0.000020, 1.000000, 0.000000, 0.000000, 0.000504,
1.000000, 0.000000, 0.000000, 0.002016, 1.000000, 0.000000, 0.000000, 0.004535,
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.c b/source/blender/draw/intern/draw_cache_extract_mesh.c
index bd057f92d62..b0a0766eedb 100644
--- a/source/blender/draw/intern/draw_cache_extract_mesh.c
+++ b/source/blender/draw/intern/draw_cache_extract_mesh.c
@@ -537,18 +537,20 @@ static void extract_tris_finish(const MeshRenderData *mr, void *ibo, void *_data
MEM_freeN(data);
}
-const MeshExtract extract_tris = {extract_tris_init,
- extract_tris_looptri_bmesh,
- extract_tris_looptri_mesh,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- extract_tris_finish,
- 0,
- false};
+static const MeshExtract extract_tris = {
+ extract_tris_init,
+ extract_tris_looptri_bmesh,
+ extract_tris_looptri_mesh,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ extract_tris_finish,
+ 0,
+ false,
+};
/** \} */
@@ -648,18 +650,20 @@ static void extract_lines_finish(const MeshRenderData *mr, void *ibo, void *elb)
}
}
-const MeshExtract extract_lines = {extract_lines_init,
- NULL,
- NULL,
- extract_lines_loop_bmesh,
- extract_lines_loop_mesh,
- extract_lines_ledge_bmesh,
- extract_lines_ledge_mesh,
- NULL,
- NULL,
- extract_lines_finish,
- 0,
- false};
+static const MeshExtract extract_lines = {
+ extract_lines_init,
+ NULL,
+ NULL,
+ extract_lines_loop_bmesh,
+ extract_lines_loop_mesh,
+ extract_lines_ledge_bmesh,
+ extract_lines_ledge_mesh,
+ NULL,
+ NULL,
+ extract_lines_finish,
+ 0,
+ false,
+};
/** \} */
@@ -753,18 +757,20 @@ static void extract_points_finish(const MeshRenderData *UNUSED(mr), void *ibo, v
MEM_freeN(elb);
}
-const MeshExtract extract_points = {extract_points_init,
- NULL,
- NULL,
- extract_points_loop_bmesh,
- extract_points_loop_mesh,
- extract_points_ledge_bmesh,
- extract_points_ledge_mesh,
- extract_points_lvert_bmesh,
- extract_points_lvert_mesh,
- extract_points_finish,
- 0,
- false};
+static const MeshExtract extract_points = {
+ extract_points_init,
+ NULL,
+ NULL,
+ extract_points_loop_bmesh,
+ extract_points_loop_mesh,
+ extract_points_ledge_bmesh,
+ extract_points_ledge_mesh,
+ extract_points_lvert_bmesh,
+ extract_points_lvert_mesh,
+ extract_points_finish,
+ 0,
+ false,
+};
/** \} */
@@ -816,18 +822,20 @@ static void extract_fdots_finish(const MeshRenderData *UNUSED(mr), void *ibo, vo
MEM_freeN(elb);
}
-const MeshExtract extract_fdots = {extract_fdots_init,
- NULL,
- NULL,
- extract_fdots_loop_bmesh,
- extract_fdots_loop_mesh,
- NULL,
- NULL,
- NULL,
- NULL,
- extract_fdots_finish,
- 0,
- false};
+static const MeshExtract extract_fdots = {
+ extract_fdots_init,
+ NULL,
+ NULL,
+ extract_fdots_loop_bmesh,
+ extract_fdots_loop_mesh,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ extract_fdots_finish,
+ 0,
+ false,
+};
/** \} */
@@ -889,18 +897,20 @@ static void extract_lines_paint_mask_finish(const MeshRenderData *UNUSED(mr),
MEM_freeN(data);
}
-const MeshExtract extract_lines_paint_mask = {extract_lines_paint_mask_init,
- NULL,
- NULL,
- NULL,
- extract_lines_paint_mask_loop_mesh,
- NULL,
- NULL,
- NULL,
- NULL,
- extract_lines_paint_mask_finish,
- 0,
- false};
+static const MeshExtract extract_lines_paint_mask = {
+ extract_lines_paint_mask_init,
+ NULL,
+ NULL,
+ NULL,
+ extract_lines_paint_mask_loop_mesh,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ extract_lines_paint_mask_finish,
+ 0,
+ false,
+};
/** \} */
@@ -1041,18 +1051,20 @@ static void extract_lines_adjacency_finish(const MeshRenderData *mr, void *ibo,
#undef NO_EDGE
-const MeshExtract extract_lines_adjacency = {extract_lines_adjacency_init,
- extract_lines_adjacency_looptri_bmesh,
- extract_lines_adjacency_looptri_mesh,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- extract_lines_adjacency_finish,
- 0,
- false};
+static const MeshExtract extract_lines_adjacency = {
+ extract_lines_adjacency_init,
+ extract_lines_adjacency_looptri_bmesh,
+ extract_lines_adjacency_looptri_mesh,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ extract_lines_adjacency_finish,
+ 0,
+ false,
+};
/** \} */
@@ -1115,18 +1127,20 @@ static void extract_edituv_tris_finish(const MeshRenderData *UNUSED(mr), void *i
MEM_freeN(extract_data);
}
-const MeshExtract extract_edituv_tris = {extract_edituv_tris_init,
- extract_edituv_tris_looptri_bmesh,
- extract_edituv_tris_looptri_mesh,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- extract_edituv_tris_finish,
- 0,
- false};
+static const MeshExtract extract_edituv_tris = {
+ extract_edituv_tris_init,
+ extract_edituv_tris_looptri_bmesh,
+ extract_edituv_tris_looptri_mesh,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ extract_edituv_tris_finish,
+ 0,
+ false,
+};
/** \} */
@@ -1188,18 +1202,20 @@ static void extract_edituv_lines_finish(const MeshRenderData *UNUSED(mr), void *
MEM_freeN(extract_data);
}
-const MeshExtract extract_edituv_lines = {extract_edituv_lines_init,
- NULL,
- NULL,
- extract_edituv_lines_loop_bmesh,
- extract_edituv_lines_loop_mesh,
- NULL,
- NULL,
- NULL,
- NULL,
- extract_edituv_lines_finish,
- 0,
- false};
+static const MeshExtract extract_edituv_lines = {
+ extract_edituv_lines_init,
+ NULL,
+ NULL,
+ extract_edituv_lines_loop_bmesh,
+ extract_edituv_lines_loop_mesh,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ extract_edituv_lines_finish,
+ 0,
+ false,
+};
/** \} */
@@ -1257,18 +1273,20 @@ static void extract_edituv_points_finish(const MeshRenderData *UNUSED(mr), void
MEM_freeN(extract_data);
}
-const MeshExtract extract_edituv_points = {extract_edituv_points_init,
- NULL,
- NULL,
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list