]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/splines/splines.cpp
Remove -Wno-unused-but-set-variable
[xonotic/netradiant.git] / libs / splines / splines.cpp
index 42c3493958744bf3ab89b578e4be6dbcdfcf786a..901b4f2c819f6d9373f57de94fe18e5f728e3b50 100644 (file)
@@ -393,7 +393,6 @@ void idSplineList::setSelectedPoint( idVec3 *p ) {
 
 const idVec3 *idSplineList::getPosition( long t ) {
        static idVec3 interpolatedPos;
-       static long lastTime = -1;
 
        int count = splineTime.Num();
        if ( count == 0 ) {
@@ -644,7 +643,6 @@ bool idCameraDef::waitEvent( int index ) {
 
 void idCameraDef::buildCamera() {
        int i;
-       int lastSwitch = 0;
        idList<float> waits;
        idList<int> targets;
 
@@ -653,9 +651,9 @@ void idCameraDef::buildCamera() {
        // we have a base time layout for the path and the target path
        // now we need to layer on any wait or speed changes
        for ( i = 0; i < events.Num(); i++ ) {
-               idCameraEvent *ev = events[i];
                events[i]->setTriggered( false );
                switch ( events[i]->getType() ) {
+               default: break;
                case idCameraEvent::EVENT_TARGET: {
                        targets.Append( i );
                        break;
@@ -864,7 +862,8 @@ void idCameraDef::parse( const char *( *text )  ) {
 bool idCameraDef::load( const char *filename ) {
        char *buf;
        const char *buf_p;
-       int length = FS_ReadFile( filename, (void **)&buf );
+
+       FS_ReadFile( filename, (void **)&buf );
        if ( !buf ) {
                return false;
        }
@@ -1168,7 +1167,7 @@ void idFixedPosition::parse( const char *( *text )  ) {
                        Com_UngetToken();
                        idStr key = Com_ParseOnLine( text );
 
-                       const char *token = Com_Parse( text );
+                       Com_Parse( text );
                        if ( Q_stricmp( key.c_str(), "pos" ) == 0 ) {
                                Com_UngetToken();
                                Com_Parse1DMatrix( text, 3, pos );
@@ -1177,7 +1176,7 @@ void idFixedPosition::parse( const char *( *text )  ) {
                                Com_UngetToken();
                                idCameraPosition::parseToken( key.c_str(), text );
                        }
-                       token = Com_Parse( text );
+                       Com_Parse( text );
 
                } while ( 1 );
 
@@ -1214,7 +1213,7 @@ void idInterpolatedPosition::parse( const char *( *text )  ) {
                        Com_UngetToken();
                        idStr key = Com_ParseOnLine( text );
 
-                       const char *token = Com_Parse( text );
+                       Com_Parse( text );
                        if ( Q_stricmp( key.c_str(), "startPos" ) == 0 ) {
                                Com_UngetToken();
                                Com_Parse1DMatrix( text, 3, startPos );
@@ -1227,7 +1226,7 @@ void idInterpolatedPosition::parse( const char *( *text )  ) {
                                Com_UngetToken();
                                idCameraPosition::parseToken( key.c_str(), text );
                        }
-                       token = Com_Parse( text );
+                       Com_Parse( text );
 
                } while ( 1 );
 
@@ -1265,7 +1264,7 @@ void idSplinePosition::parse( const char *( *text )  ) {
                        Com_UngetToken();
                        idStr key = Com_ParseOnLine( text );
 
-                       const char *token = Com_Parse( text );
+                       Com_Parse( text );
                        if ( Q_stricmp( key.c_str(), "target" ) == 0 ) {
                                target.parse( text );
                        }
@@ -1273,7 +1272,7 @@ void idSplinePosition::parse( const char *( *text )  ) {
                                Com_UngetToken();
                                idCameraPosition::parseToken( key.c_str(), text );
                        }
-                       token = Com_Parse( text );
+                       Com_Parse( text );
 
                } while ( 1 );
 
@@ -1363,7 +1362,6 @@ void idSplinePosition::write( fileHandle_t file, const char *p ) {
 }
 
 void idCameraDef::addTarget( const char *name, idCameraPosition::positionType type ) {
-       const char *text = ( name == NULL ) ? va( "target0%d", numTargets() + 1 ) : name;
        idCameraPosition *pos = newFromType( type );
        if ( pos ) {
                pos->setName( name );