diff options
-rw-r--r-- | source/blender/avi/intern/avi.c | 34 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_utildefines.h | 4 | ||||
-rw-r--r-- | source/gameengine/GameLogic/SCA_IInputDevice.h | 1 | ||||
-rw-r--r-- | source/gameengine/GameLogic/SCA_KeyboardSensor.cpp | 9 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 3 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_TouchEventManager.cpp | 7 | ||||
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 5 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/VideoBase.cpp | 2 |
8 files changed, 42 insertions, 23 deletions
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index 5f0d36e17e2..53be1b4467a 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -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 @@ int AVI_is_avi (char *name) { AviBitmapInfoHeader bheader; int movie_tracks = 0; - DEBUG("opening movie\n"); + DEBUG_PRINT("opening movie\n"); memset(&movie, 0, sizeof(AviMovie)); @@ -243,7 +243,7 @@ int AVI_is_avi (char *name) { 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 @@ int AVI_is_avi (char *name) { 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 @@ int AVI_is_avi (char *name) { 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 @@ int AVI_is_avi (char *name) { 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 @@ int AVI_is_avi (char *name) { 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 @@ int AVI_is_avi (char *name) { 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 @@ AviError AVI_open_movie (char *name, AviMovie *movie) { 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 @@ AviError AVI_open_movie (char *name, AviMovie *movie) { 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 @@ AviError AVI_open_movie (char *name, AviMovie *movie) { 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 @@ AviError AVI_open_movie (char *name, AviMovie *movie) { 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 @@ AviError AVI_open_movie (char *name, AviMovie *movie) { 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 @@ AviError AVI_open_movie (char *name, AviMovie *movie) { 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 @@ AviError AVI_open_movie (char *name, AviMovie *movie) { 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 @@ AviError AVI_open_movie (char *name, AviMovie *movie) { movie->read_offset= 4; } - DEBUG("movie succesfully opened\n"); + DEBUG_PRINT("movie succesfully opened\n"); return AVI_ERROR_NONE; } diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h index 83dcde26233..016aef4d865 100644 --- a/source/blender/blenkernel/BKE_utildefines.h +++ b/source/blender/blenkernel/BKE_utildefines.h @@ -262,8 +262,8 @@ behaviour, though it may not be the best in practice. #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++) diff --git a/source/gameengine/GameLogic/SCA_IInputDevice.h b/source/gameengine/GameLogic/SCA_IInputDevice.h index a13efee1316..0dbfe424e2c 100644 --- a/source/gameengine/GameLogic/SCA_IInputDevice.h +++ b/source/gameengine/GameLogic/SCA_IInputDevice.h @@ -47,7 +47,6 @@ public: KX_JUSTACTIVATED, KX_ACTIVE, KX_JUSTRELEASED, - KX_MAX_INPUTSTATUS }; SCA_InputEvent(SCA_EnumInputs status=KX_NO_INPUTSTATUS,int eventval=0) diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index c49d65226dc..1a87528e540 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -156,6 +156,9 @@ bool SCA_KeyboardSensor::Evaluate() case SCA_InputEvent::KX_ACTIVE: active = true; break; + case SCA_InputEvent::KX_NO_INPUTSTATUS: + /* do nothing */ + break; } } @@ -221,6 +224,9 @@ bool SCA_KeyboardSensor::Evaluate() 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 @@ bool SCA_KeyboardSensor::Evaluate() break; case SCA_InputEvent::KX_JUSTACTIVATED: qual_change = true; + case SCA_InputEvent::KX_ACTIVE: + /* do nothing */ + break; } } /* done reading qualifiers */ diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 1888e7cf7b8..e238d7babec 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -218,6 +218,9 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, break; } + case KX_BOUND_DYN_MESH: + /* do nothing */ + break; } diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.cpp b/source/gameengine/Ketsji/KX_TouchEventManager.cpp index eb55d0272f6..95928ac5889 100644 --- a/source/gameengine/Ketsji/KX_TouchEventManager.cpp +++ b/source/gameengine/Ketsji/KX_TouchEventManager.cpp @@ -109,6 +109,13 @@ bool KX_TouchEventManager::newBroadphaseResponse(void *client_data, } } return false; + + // quiet the compiler + case KX_ClientObjectInfo::STATIC: + case KX_ClientObjectInfo::ACTOR: + case KX_ClientObjectInfo::RESERVED1: + /* do nothing*/ + break; } return true; } diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 477a2c35d4f..eb525af7dc7 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -287,6 +287,7 @@ void CcdPhysicsEnvironment::setDebugDrawer(btIDebugDraw* debugDrawer) 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,10 +315,8 @@ static void DrawAabb(btIDebugDraw* debugDrawer,const btVector3& from,const btVec if (i<3) edgecoord[i]*=-1.f; } - - } - +#endif diff --git a/source/gameengine/VideoTexture/VideoBase.cpp b/source/gameengine/VideoTexture/VideoBase.cpp index 5de7a9e80a9..322ede7004d 100644 --- a/source/gameengine/VideoTexture/VideoBase.cpp +++ b/source/gameengine/VideoTexture/VideoBase.cpp @@ -82,6 +82,8 @@ void VideoBase::process (BYTE * sample) // finish break; } + case None: + break; /* assert? */ } } } |