From ca8d032cfb30858972aa9101b8820afd90cfbf82 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 17 Mar 2012 23:09:08 +0100 Subject: [PATCH] fix warning: unused variable 'foo' --- libs/splines/splines.cpp | 7 ++----- libs/splines/util_str.cpp | 3 --- plugins/imagehl/lbmlib.cpp | 4 +--- plugins/surface_heretic2/surfacedialog.cpp | 4 ---- plugins/surface_ufoai/surfacedialog.cpp | 4 ---- tools/quake3/q3map2/light_ydnar.c | 2 +- 6 files changed, 4 insertions(+), 20 deletions(-) diff --git a/libs/splines/splines.cpp b/libs/splines/splines.cpp index c0d95c01..b9b7c0c9 100644 --- a/libs/splines/splines.cpp +++ b/libs/splines/splines.cpp @@ -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 waits; idList targets; @@ -653,7 +651,6 @@ 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() ) { case idCameraEvent::EVENT_TARGET: { @@ -864,7 +861,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; } @@ -1363,7 +1361,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 ); diff --git a/libs/splines/util_str.cpp b/libs/splines/util_str.cpp index eb51533c..52a01a36 100644 --- a/libs/splines/util_str.cpp +++ b/libs/splines/util_str.cpp @@ -487,9 +487,6 @@ void TestStringClass i = a.length(); // i == 0 i = c.length(); // i == 4 - const char *s1 = a.c_str(); // s1 == "\0" - const char *s2 = c.c_str(); // s2 == "test\0" - t = new idStr(); // t->len == 0, t->data == "\0" delete t; // t == ? diff --git a/plugins/imagehl/lbmlib.cpp b/plugins/imagehl/lbmlib.cpp index 9262cda2..beb83b6d 100644 --- a/plugins/imagehl/lbmlib.cpp +++ b/plugins/imagehl/lbmlib.cpp @@ -133,8 +133,6 @@ static void LoadIDSP( const char *name, byte ** pic, int *width, int *height ){ dspriteframetype_t *pframetype; int version; int numframes; - int size; - spriteframetype_t frametype; dspriteframe_t *spriteframe; *pic = NULL; @@ -201,7 +199,7 @@ static void LoadIDSP( const char *name, byte ** pic, int *width, int *height ){ *pic = bmpRGBA; #ifdef DEBUG - frametype = spriteframetype_t( LittleLong( pframetype->type ) ); + spriteframetype_t frametype = spriteframetype_t( LittleLong( pframetype->type ) ); if ( frametype == SPR_SINGLE ) { Sys_Printf( "Single Frame\n" ); } diff --git a/plugins/surface_heretic2/surfacedialog.cpp b/plugins/surface_heretic2/surfacedialog.cpp index 829ad8d9..fd06da6d 100644 --- a/plugins/surface_heretic2/surfacedialog.cpp +++ b/plugins/surface_heretic2/surfacedialog.cpp @@ -219,7 +219,6 @@ static void on_cancel_button_clicked( GtkButton *button, gpointer user_data ); void IsFaceConflicting(){ texdef_t* tmp_texdef; texdef_to_face_t* temp_texdef_face_list; - char buf[12]; char texture_name[128]; if ( texdef_face_list_empty() ) { @@ -328,7 +327,6 @@ static void PopulateTextureComboList(){ texdef_to_face_t* temp_texdef_face_list; char blank[1]; GList *items = NULL; - GList *tmp_item; int num_of_list_items = 0; blank[0] = 0; @@ -390,7 +388,6 @@ static void GetTexdefInfo_from_Radiant(){ g_texdef_face_vector.resize( count ); if ( !texdef_face_list_empty() ) { - texdef_to_face_t* p = get_texdef_face_list(); GetSelFacesTexdef( get_texdef_face_list() ); } @@ -1861,7 +1858,6 @@ static void on_fit_button_clicked( GtkButton *button, gpointer user_data ){ // Axial Button static void on_axial_button_clicked( GtkButton *button, gpointer user_data ){ texdef_t* tmp_texdef; - texdef_t* tmp_orig_texdef; texdef_to_face_t* temp_texdef_face_list; if ( !texdef_face_list_empty() && g_bListenChanged ) { diff --git a/plugins/surface_ufoai/surfacedialog.cpp b/plugins/surface_ufoai/surfacedialog.cpp index c6b9f0c8..5e0eebc2 100644 --- a/plugins/surface_ufoai/surfacedialog.cpp +++ b/plugins/surface_ufoai/surfacedialog.cpp @@ -220,7 +220,6 @@ static void on_cancel_button_clicked( GtkButton *button, gpointer user_data ); void IsFaceConflicting(){ texdef_t* tmp_texdef; texdef_to_face_t* temp_texdef_face_list; - char buf[12]; char texture_name[128]; if ( texdef_face_list_empty() ) { @@ -329,7 +328,6 @@ static void PopulateTextureComboList(){ texdef_to_face_t* temp_texdef_face_list; char blank[1]; GList *items = NULL; - GList *tmp_item; int num_of_list_items = 0; blank[0] = 0; @@ -391,7 +389,6 @@ static void GetTexdefInfo_from_Radiant(){ g_texdef_face_vector.resize( count ); if ( !texdef_face_list_empty() ) { - texdef_to_face_t* p = get_texdef_face_list(); GetSelFacesTexdef( get_texdef_face_list() ); } @@ -1861,7 +1858,6 @@ static void on_fit_button_clicked( GtkButton *button, gpointer user_data ){ // Axial Button static void on_axial_button_clicked( GtkButton *button, gpointer user_data ){ texdef_t* tmp_texdef; - texdef_t* tmp_orig_texdef; texdef_to_face_t* temp_texdef_face_list; if ( !texdef_face_list_empty() && g_bListenChanged ) { diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 794f2cb8..cb0430ea 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -3179,7 +3179,7 @@ void SetupEnvelopes( qboolean forGrid, qboolean fastFlag ){ int i, x, y, z, x1, y1, z1; light_t *light, *light2, **owner; bspLeaf_t *leaf; - vec3_t origin, dir, mins, maxs, nullVector = { 0, 0, 0 }; + vec3_t origin, dir, mins, maxs; float radius, intensity; light_t *buckets[ 256 ]; -- 2.39.2