[Bf-blender-cvs] [d4a1138] master: Code Cleanup: warnings

Campbell Barton noreply at git.blender.org
Fri Nov 22 01:31:17 CET 2013


Commit: d4a11388bf988b9377b19269abf2f0632ddd1fd5
Author: Campbell Barton
Date:   Fri Nov 22 11:30:40 2013 +1100
http://developer.blender.org/rBd4a11388bf988b9377b19269abf2f0632ddd1fd5

Code Cleanup: warnings

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

M	CMakeLists.txt
M	source/blender/bmesh/tools/bmesh_beautify.c
M	source/blender/compositor/intern/COM_SocketReader.h
M	source/blender/compositor/intern/COM_WorkScheduler.cpp
M	source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc6c83e..a7f6b87 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2058,6 +2058,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 	ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS    -Wno-unused-macros)
 
 	ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
+	ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
 	ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
 	ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
 	ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
diff --git a/source/blender/bmesh/tools/bmesh_beautify.c b/source/blender/bmesh/tools/bmesh_beautify.c
index 1a1201c..cad5e1b 100644
--- a/source/blender/bmesh/tools/bmesh_beautify.c
+++ b/source/blender/bmesh/tools/bmesh_beautify.c
@@ -309,8 +309,6 @@ static void bm_edge_update_beauty_cost_single(BMEdge *e, Heap *eheap, HeapNode *
 
 		/* check if we can add it back */
 		BLI_assert(BM_edge_is_manifold(e) == true);
-		//BLI_assert(BMO_elem_flag_test(bm, e->l->f, FACE_MARK) &&
-		//           BMO_elem_flag_test(bm, e->l->radial_next->f, FACE_MARK));
 
 		/* check we're not moving back into a state we have been in before */
 		if (e_state_set != NULL) {
@@ -354,9 +352,6 @@ static void bm_edge_update_beauty_cost(BMEdge *e, Heap *eheap, HeapNode **eheap_
 /* -------------------------------------------------------------------- */
 /* Beautify Fill */
 
-#define ELE_NEW		1
-#define FACE_MARK	2
-
 /**
  * \note All edges in \a edge_array must be tagged and
  * have their index values set according to their position in the array.
diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h
index 2eaeb66..2168611 100644
--- a/source/blender/compositor/intern/COM_SocketReader.h
+++ b/source/blender/compositor/intern/COM_SocketReader.h
@@ -102,11 +102,11 @@ public:
 	}
 
 	virtual void *initializeTileData(rcti *rect) { return 0; }
-	virtual void deinitializeTileData(rcti *rect, void *data) {
-	}
-	
-	virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return 0; }
+	virtual void deinitializeTileData(rcti *rect, void *data) {}
 
+	virtual ~SocketReader() {}
+
+	virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return 0; }
 
 	inline const unsigned int getWidth() const { return this->m_width; }
 	inline const unsigned int getHeight() const { return this->m_height; }
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 330e61e..57e996f 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -77,9 +77,9 @@ static bool g_openclInitialized = false;
 #define MAX_HIGHLIGHT 8
 static bool g_highlightInitialized = false;
 extern "C" {
-int g_highlightIndex;
-void **g_highlightedNodes;
-void **g_highlightedNodesRead;
+static int g_highlightIndex;
+static void **g_highlightedNodes;
+static void **g_highlightedNodesRead;
 
 #if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
 #define HIGHLIGHT(wp) \
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
index a8c7728..bc79224 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
@@ -29,7 +29,7 @@ extern "C" {
 }
 
 
-vector<DistortionCache *> s_cache;
+static vector<DistortionCache *> s_cache;
 
 void deintializeDistortionCache(void) 
 {
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 5105e2c..2884983 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -1229,7 +1229,7 @@ void RAS_OpenGLRasterizer::RemoveLight(struct RAS_LightObject* lightobject)
 		m_lights.erase(lit);
 }
 
-bool RAS_OpenGLRasterizer::RayHit(class KX_ClientObjectInfo *client, KX_RayCast *result, void * const data)
+bool RAS_OpenGLRasterizer::RayHit(struct KX_ClientObjectInfo *client, KX_RayCast *result, void * const data)
 {
 	double* const oglmatrix = (double* const) data;
 
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
index e1159ab..01c4205 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
@@ -380,8 +380,8 @@ public:
 	void	PushMatrix();
 	void	PopMatrix();
 
-	bool RayHit(class KX_ClientObjectInfo* client, class KX_RayCast* result, void * const data);
-	bool NeedRayCast(class KX_ClientObjectInfo*) { return true; }
+	bool RayHit(struct KX_ClientObjectInfo* client, class KX_RayCast* result, void * const data);
+	bool NeedRayCast(struct KX_ClientObjectInfo*) { return true; }
 
 
 	void AddLight(struct RAS_LightObject* lightobject);




More information about the Bf-blender-cvs mailing list