Skip to content

Commit

Permalink
fix warning: unused variable 'foo'
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Mar 18, 2012
1 parent cd725d6 commit ca8d032
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 20 deletions.
7 changes: 2 additions & 5 deletions libs/splines/splines.cpp
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -644,7 +643,6 @@ bool idCameraDef::waitEvent( int index ) {

void idCameraDef::buildCamera() {
int i;
int lastSwitch = 0;
idList<float> waits;
idList<int> targets;

Expand All @@ -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: {
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 );
Expand Down
3 changes: 0 additions & 3 deletions libs/splines/util_str.cpp
Expand Up @@ -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 == ?

Expand Down
4 changes: 1 addition & 3 deletions plugins/imagehl/lbmlib.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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" );
}
Expand Down
4 changes: 0 additions & 4 deletions plugins/surface_heretic2/surfacedialog.cpp
Expand Up @@ -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() ) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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() );
}

Expand Down Expand Up @@ -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 ) {
Expand Down
4 changes: 0 additions & 4 deletions plugins/surface_ufoai/surfacedialog.cpp
Expand Up @@ -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() ) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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() );
}

Expand Down Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion tools/quake3/q3map2/light_ydnar.c
Expand Up @@ -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 ];

Expand Down

0 comments on commit ca8d032

Please sign in to comment.