[Bf-blender-cvs] [07dd208209c] blender2.8: Cleanup: warnings

Campbell Barton noreply at git.blender.org
Sat May 20 16:49:24 CEST 2017


Commit: 07dd208209ce24b95e992928edcb63638256bf00
Author: Campbell Barton
Date:   Sun May 21 09:39:31 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB07dd208209ce24b95e992928edcb63638256bf00

Cleanup: warnings

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

M	source/blender/blenkernel/intern/layer.c
M	source/blender/draw/intern/draw_cache_impl_mesh.c
M	source/blender/draw/intern/draw_manager.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/gpu/intern/gpu_draw.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c

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

diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 111408a01af..8f384db40e3 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1802,7 +1802,7 @@ void BKE_layer_eval_layer_collection_post(struct EvaluationContext *UNUSED(eval_
 /**
  * Free any static allocated memory.
  */
-void BKE_layer_exit()
+void BKE_layer_exit(void)
 {
 	layer_collection_engine_settings_validate_free();
 }
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 999ce0a95e4..a9299acb472 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -382,6 +382,8 @@ static MeshRenderData *mesh_render_data_create(Mesh *me, const int types)
 
 		/* don't access mesh directly, instead use vars taken from BMesh or Mesh */
 #define me DONT_USE_THIS
+#ifdef  me /* quiet warning */
+#endif
 
 		rdata->uv_len = CustomData_number_of_layers(cd_ldata, CD_MLOOPUV);
 		rdata->vcol_len = CustomData_number_of_layers(cd_ldata, CD_MLOOPCOL);
@@ -496,6 +498,8 @@ static MeshRenderData *mesh_render_data_create(Mesh *me, const int types)
 					BKE_mesh_loop_tangents_ex(me->mvert, me->totvert, me->mloop, rdata->mtangent[i],
 					      loopnors, rdata->mloopuv[i], me->totloop, me->mpoly, me->totpoly, NULL);
 #define me DONT_USE_THIS
+#ifdef  me /* quiet warning */
+#endif
 				}
 			}
 		}
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 668d659298a..e3137e16caf 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -2419,7 +2419,7 @@ static void DRW_engines_draw_text(void)
 /**
  * Returns the offset required for the drawing of engines info.
  */
-int DRW_draw_region_engine_info_offset()
+int DRW_draw_region_engine_info_offset(void)
 {
 	int lines = 0;
 	for (LinkData *link = DST.enabled_engines.first; link; link = link->next) {
@@ -2443,7 +2443,7 @@ int DRW_draw_region_engine_info_offset()
 /**
  * Actual drawing;
  */
-void DRW_draw_region_engine_info()
+void DRW_draw_region_engine_info(void)
 {
 	const char *info_array_final[MAX_INFO_LINES + 1];
 	char info_array[MAX_INFO_LINES][GPU_INFO_SIZE]; /* This should be maxium number of engines running at the same time. */
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index e6bde8463ef..9c55e99b151 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -944,6 +944,7 @@ static void view3d_main_region_listener(
 								break;
 						}
 					}
+					ATTR_FALLTHROUGH;
 				}
 				case ND_DATA:
 				case ND_VERTEX_GROUP:
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 3abced40202..cb1f023bbae 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -2533,7 +2533,7 @@ static void restore_mask(GLenum cap, const bool value) {
 	}
 }
 
-void gpuPopAttrib()
+void gpuPopAttrib(void)
 {
 	BLI_assert(AttribStack.top > 0);
 	AttribStack.top--;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index d578c17fe2c..eadb4764abf 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -82,8 +82,6 @@
 
 #include "BLI_threads.h"
 
-#define NO_ENGINE "NO_ENGINE"
-
 #ifdef WITH_OPENEXR
 EnumPropertyItem rna_enum_exr_codec_items[] = {
 	{R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""},
@@ -9322,5 +9320,3 @@ void RNA_def_scene(BlenderRNA *brna)
 }
 
 #endif
-
-#undef NO_ENGINE
diff --git a/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c b/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c
index 99ca161f08f..a95d8033a30 100644
--- a/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c
+++ b/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c
@@ -256,8 +256,6 @@ static void manipulator_arrow_draw(const bContext *UNUSED(C), wmManipulator *man
  * Calculate arrow offset independent from prop min value,
  * meaning the range will not be offset by min value first.
  */
-#define USE_ABS_HANDLE_RANGE
-
 static int manipulator_arrow_handler(bContext *C, const wmEvent *event, wmManipulator *manipulator, const int flag)
 {
 	ArrowManipulator *arrow = (ArrowManipulator *)manipulator;




More information about the Bf-blender-cvs mailing list