Quiet compiler warnings.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 20 Oct 2010 12:33:00 +0000 (12:33 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 20 Oct 2010 12:33:00 +0000 (12:33 +0000)
source/blender/avi/intern/avi.c
source/blender/blenkernel/BKE_utildefines.h
source/gameengine/GameLogic/SCA_IInputDevice.h
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_TouchEventManager.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/VideoTexture/VideoBase.cpp

index 5f0d36e..53be1b4 100644 (file)
@@ -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;
 }
 
index 83dcde2..016aef4 100644 (file)
@@ -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++)
 
index a13efee..0dbfe42 100644 (file)
@@ -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)
index c49d652..1a87528 100644 (file)
@@ -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 */
index 1888e7c..e238d7b 100644 (file)
@@ -218,6 +218,9 @@ void        KX_ConvertBulletObject( class   KX_GameObject* gameobj,
 
                        break;
                }
+       case KX_BOUND_DYN_MESH:
+               /* do nothing */
+               break;
        }
 
 
index eb55d02..95928ac 100644 (file)
@@ -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;
 }
index 477a2c3..eb525af 100644 (file)
@@ -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
 
 
 
index 5de7a9e..322ede7 100644 (file)
@@ -82,6 +82,8 @@ void VideoBase::process (BYTE * sample)
                                // finish
                                break;
                        }
+               case None:
+                       break; /* assert? */
                }
        }
 }