[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32613] trunk/blender/source: Quiet compiler warnings.

Campbell Barton ideasman42 at gmail.com
Wed Oct 20 14:33:01 CEST 2010


Revision: 32613
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32613
Author:   campbellbarton
Date:     2010-10-20 14:33:00 +0200 (Wed, 20 Oct 2010)

Log Message:
-----------
Quiet compiler warnings.

Modified Paths:
--------------
    trunk/blender/source/blender/avi/intern/avi.c
    trunk/blender/source/blender/blenkernel/BKE_utildefines.h
    trunk/blender/source/gameengine/GameLogic/SCA_IInputDevice.h
    trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
    trunk/blender/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
    trunk/blender/source/gameengine/Ketsji/KX_TouchEventManager.cpp
    trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
    trunk/blender/source/gameengine/VideoTexture/VideoBase.cpp

Modified: trunk/blender/source/blender/avi/intern/avi.c
===================================================================
--- trunk/blender/source/blender/avi/intern/avi.c	2010-10-20 12:11:09 UTC (rev 32612)
+++ trunk/blender/source/blender/avi/intern/avi.c	2010-10-20 12:33:00 UTC (rev 32613)
@@ -48,7 +48,7 @@
 static int AVI_DEBUG=0;
 static char DEBUG_FCC[4];
 
-#define DEBUG(x) if(AVI_DEBUG) printf("AVI DEBUG: " x);
+#define DEBUG_PRINT(x) if(AVI_DEBUG) printf("AVI DEBUG: " x);
 
 /* local functions */
 char *fcc_to_char (unsigned int fcc);
@@ -218,7 +218,7 @@
 	AviBitmapInfoHeader bheader;
 	int movie_tracks = 0;
 	
-	DEBUG("opening movie\n");
+	DEBUG_PRINT("opening movie\n");
 
 	memset(&movie, 0, sizeof(AviMovie));
 
@@ -243,7 +243,7 @@
 		GET_FCC (movie.fp) != FCC("hdrl") ||
 		(movie.header->fcc = GET_FCC (movie.fp)) != FCC("avih") ||
 		!(movie.header->size = GET_FCC (movie.fp))) {
-		DEBUG("bad initial header info\n");
+		DEBUG_PRINT("bad initial header info\n");
 		fclose(movie.fp);
 		return 0;
 	}
@@ -266,7 +266,7 @@
 	fseek (movie.fp, movie.header->size-14*4, SEEK_CUR);
 
 	if (movie.header->Streams < 1) {
-		DEBUG("streams less than 1\n");
+		DEBUG_PRINT("streams less than 1\n");
 		fclose(movie.fp);
 		return 0;
 	}
@@ -280,7 +280,7 @@
 			GET_FCC (movie.fp) != FCC ("strl") ||
 			(movie.streams[temp].sh.fcc = GET_FCC (movie.fp)) != FCC ("strh") ||
 			!(movie.streams[temp].sh.size = GET_FCC (movie.fp))) {
-			DEBUG("bad stream header information\n");
+			DEBUG_PRINT("bad stream header information\n");
 			
 			MEM_freeN(movie.streams);
 			fclose(movie.fp);
@@ -328,7 +328,7 @@
 		fseek (movie.fp, movie.streams[temp].sh.size-14*4, SEEK_CUR);
 
 		if (GET_FCC (movie.fp) != FCC("strf")) {
-			DEBUG("no stream format information\n");
+			DEBUG_PRINT("no stream format information\n");
 			MEM_freeN(movie.streams);
 			fclose(movie.fp);
 			return 0;
@@ -384,7 +384,7 @@
 		while (GET_FCC (movie.fp) != FCC("LIST")) {
 			temp= GET_FCC (movie.fp);
 			if (temp<0 || ftell(movie.fp) > movie.size) {
-				DEBUG("incorrect size in header or error in AVI\n");
+				DEBUG_PRINT("incorrect size in header or error in AVI\n");
 				
 				MEM_freeN(movie.streams);
 				fclose(movie.fp);
@@ -407,7 +407,7 @@
 AviError AVI_open_movie (char *name, AviMovie *movie) {
 	int temp, fcca, size, j;
 	
-	DEBUG("opening movie\n");
+	DEBUG_PRINT("opening movie\n");
 
 	memset(movie, 0, sizeof(AviMovie));
 
@@ -430,7 +430,7 @@
 		GET_FCC (movie->fp) != FCC("hdrl") ||
 		(movie->header->fcc = GET_FCC (movie->fp)) != FCC("avih") ||
 		!(movie->header->size = GET_FCC (movie->fp))) {
-		DEBUG("bad initial header info\n");
+		DEBUG_PRINT("bad initial header info\n");
 		return AVI_ERROR_FORMAT;
 	}
 	
@@ -452,7 +452,7 @@
 	fseek (movie->fp, movie->header->size-14*4, SEEK_CUR);
 
 	if (movie->header->Streams < 1) {
-		DEBUG("streams less than 1\n");
+		DEBUG_PRINT("streams less than 1\n");
 		return AVI_ERROR_FORMAT;
 	}
 	
@@ -465,7 +465,7 @@
 			GET_FCC (movie->fp) != FCC ("strl") ||
 			(movie->streams[temp].sh.fcc = GET_FCC (movie->fp)) != FCC ("strh") ||
 			!(movie->streams[temp].sh.size = GET_FCC (movie->fp))) {
-			DEBUG("bad stream header information\n");
+			DEBUG_PRINT("bad stream header information\n");
 			return AVI_ERROR_FORMAT;				
 		}
 
@@ -507,7 +507,7 @@
 		fseek (movie->fp, movie->streams[temp].sh.size-14*4, SEEK_CUR);
 
 		if (GET_FCC (movie->fp) != FCC("strf")) {
-			DEBUG("no stream format information\n");
+			DEBUG_PRINT("no stream format information\n");
 			return AVI_ERROR_FORMAT;
 		}
 
@@ -560,7 +560,7 @@
 		while (GET_FCC (movie->fp) != FCC("LIST")) {
 			temp= GET_FCC (movie->fp);
 			if (temp<0 || ftell(movie->fp) > movie->size) {
-				DEBUG("incorrect size in header or error in AVI\n");
+				DEBUG_PRINT("incorrect size in header or error in AVI\n");
 				return AVI_ERROR_FORMAT;				
 			}
 			fseek(movie->fp, temp, SEEK_CUR);			
@@ -585,7 +585,7 @@
 			fseek (movie->fp, size, SEEK_CUR);
 		}
 		if (ftell(movie->fp) > movie->size) {
-			DEBUG("incorrect size in header or error in AVI\n");
+			DEBUG_PRINT("incorrect size in header or error in AVI\n");
 			return AVI_ERROR_FORMAT;
 		}
 	}
@@ -599,13 +599,13 @@
 		fseek(movie->fp, size-4, SEEK_CUR);
 
 		if (GET_FCC(movie->fp) != FCC("idx1")) {
-			DEBUG("bad index informatio\n");
+			DEBUG_PRINT("bad index informatio\n");
 			return AVI_ERROR_FORMAT;
 		}
 
 		movie->index_entries = GET_FCC (movie->fp)/sizeof(AviIndexEntry);
 		if (movie->index_entries == 0) {
-			DEBUG("no index entries\n");
+			DEBUG_PRINT("no index entries\n");
 			return AVI_ERROR_FORMAT;
 		}
 
@@ -631,7 +631,7 @@
 			movie->read_offset= 4;
 	}
 
-	DEBUG("movie succesfully opened\n");
+	DEBUG_PRINT("movie succesfully opened\n");
 	return AVI_ERROR_NONE;
 }
 

Modified: trunk/blender/source/blender/blenkernel/BKE_utildefines.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_utildefines.h	2010-10-20 12:11:09 UTC (rev 32612)
+++ trunk/blender/source/blender/blenkernel/BKE_utildefines.h	2010-10-20 12:33:00 UTC (rev 32613)
@@ -262,8 +262,8 @@
 #define V_GROW(vec) \
 	V_SIZE(vec) > _##vec##_count ? _##vec##_count++ : \
 	((_##vec##_tmp = MEM_callocN(sizeof(*vec)*(_##vec##_count*2+2), #vec " " __FILE__ " ")),\
-	(vec && memcpy(_##vec##_tmp, vec, sizeof(*vec) * _##vec##_count)),\
-	(vec && (MEM_freeN(vec),1)),\
+	(void)(vec && memcpy(_##vec##_tmp, vec, sizeof(*vec) * _##vec##_count)),\
+	(void)(vec && (MEM_freeN(vec),1)),\
 	(vec = _##vec##_tmp),\
 	_##vec##_count++)
 

Modified: trunk/blender/source/gameengine/GameLogic/SCA_IInputDevice.h
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_IInputDevice.h	2010-10-20 12:11:09 UTC (rev 32612)
+++ trunk/blender/source/gameengine/GameLogic/SCA_IInputDevice.h	2010-10-20 12:33:00 UTC (rev 32613)
@@ -47,7 +47,6 @@
 		KX_JUSTACTIVATED,
 		KX_ACTIVE,
 		KX_JUSTRELEASED,
-		KX_MAX_INPUTSTATUS
 	};
 
 	SCA_InputEvent(SCA_EnumInputs status=KX_NO_INPUTSTATUS,int eventval=0)

Modified: trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp	2010-10-20 12:11:09 UTC (rev 32612)
+++ trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp	2010-10-20 12:33:00 UTC (rev 32613)
@@ -156,6 +156,9 @@
 			case SCA_InputEvent::KX_ACTIVE:
 				active = true;
 				break;
+			case SCA_InputEvent::KX_NO_INPUTSTATUS:
+				/* do nothing */
+				break;
 			}
 		}
 
@@ -221,6 +224,9 @@
 				break;
 			case SCA_InputEvent::KX_JUSTACTIVATED:
 				qual_change = true;
+			case SCA_InputEvent::KX_ACTIVE:
+				/* do nothing */
+				break;
 			}
 		}
 		if (m_qual2 > 0 && qual==true) {
@@ -236,6 +242,9 @@
 				break;
 			case SCA_InputEvent::KX_JUSTACTIVATED:
 				qual_change = true;
+			case SCA_InputEvent::KX_ACTIVE:
+				/* do nothing */
+				break;
 			}
 		}
 		/* done reading qualifiers */

Modified: trunk/blender/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp	2010-10-20 12:11:09 UTC (rev 32612)
+++ trunk/blender/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp	2010-10-20 12:33:00 UTC (rev 32613)
@@ -218,6 +218,9 @@
 
 			break;
 		}
+	case KX_BOUND_DYN_MESH:
+		/* do nothing */
+		break;
 	}
 
 

Modified: trunk/blender/source/gameengine/Ketsji/KX_TouchEventManager.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_TouchEventManager.cpp	2010-10-20 12:11:09 UTC (rev 32612)
+++ trunk/blender/source/gameengine/Ketsji/KX_TouchEventManager.cpp	2010-10-20 12:33:00 UTC (rev 32613)
@@ -109,6 +109,13 @@
 			}
 		}
 		return false;
+
+	// quiet the compiler
+	case KX_ClientObjectInfo::STATIC:
+	case KX_ClientObjectInfo::ACTOR:
+	case KX_ClientObjectInfo::RESERVED1:
+		/* do nothing*/
+		break;
 	}
 	return true;
 }

Modified: trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
===================================================================
--- trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp	2010-10-20 12:11:09 UTC (rev 32612)
+++ trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp	2010-10-20 12:33:00 UTC (rev 32613)
@@ -287,6 +287,7 @@
 	m_debugDrawer = debugDrawer;
 }
 
+#if 0
 static void DrawAabb(btIDebugDraw* debugDrawer,const btVector3& from,const btVector3& to,const btVector3& color)
 {
 	btVector3 halfExtents = (to-from)* 0.5f;
@@ -314,15 +315,13 @@
 		if (i<3)
 			edgecoord[i]*=-1.f;
 	}
-
-
 }
+#endif
 
 
 
 
 
-
 CcdPhysicsEnvironment::CcdPhysicsEnvironment(bool useDbvtCulling,btDispatcher* dispatcher,btOverlappingPairCache* pairCache)
 :m_cullingCache(NULL),
 m_cullingTree(NULL),

Modified: trunk/blender/source/gameengine/VideoTexture/VideoBase.cpp
===================================================================
--- trunk/blender/source/gameengine/VideoTexture/VideoBase.cpp	2010-10-20 12:11:09 UTC (rev 32612)
+++ trunk/blender/source/gameengine/VideoTexture/VideoBase.cpp	2010-10-20 12:33:00 UTC (rev 32613)
@@ -82,6 +82,8 @@
 				// finish
 				break;
 			}
+		case None:
+			break; /* assert? */
 		}
 	}
 }





More information about the Bf-blender-cvs mailing list