fix warning: unused variable 'foo'

This commit is contained in:
Ben Noordhuis 2012-03-17 23:09:08 +01:00
parent cd725d680a
commit ca8d032cfb
6 changed files with 4 additions and 20 deletions

View 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,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 );

View File

@ -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 == ?

View File

@ -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" );
}

View File

@ -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 ) {

View File

@ -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 ) {

View File

@ -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 ];