* fixed warnings

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@278 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
mattn 2008-06-26 11:40:59 +00:00
parent 6d10428141
commit 99b8049c8c
12 changed files with 50 additions and 48 deletions

View file

@ -243,7 +243,7 @@ static void DrawLightSphere(entity_t * e, int nGLState, int pref)
const char *target = ValueForKey(e, "target"); const char *target = ValueForKey(e, "target");
bool bIsSpotLight = !!target[0]; bool bIsSpotLight = !!target[0];
//!\todo Write an API for modules to register preference settings, and make this preference module-specific. //!\todo Write an API for modules to register preference settings, and make this preference module-specific.
int nPasses = pref == 1 ? 3 : 2; // int nPasses = pref == 1 ? 3 : 2;
g_QglTable.m_pfn_qglPushAttrib(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); g_QglTable.m_pfn_qglPushAttrib(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
g_QglTable.m_pfn_qglDepthMask(GL_FALSE); g_QglTable.m_pfn_qglDepthMask(GL_FALSE);
@ -287,7 +287,7 @@ unsigned short indices[24] = { 0, 2, 3, 0, 3, 4, 0, 4, 5, 0, 5, 2,
void DrawLight(entity_t* e, int nGLState, int pref, int nViewType) void DrawLight(entity_t* e, int nGLState, int pref, int nViewType)
{ {
int i; // int i;
// top, bottom, tleft, tright, bright, bleft // top, bottom, tleft, tright, bright, bleft
vec3_t points[6]; vec3_t points[6];
vec3_t vMid, vMin, vMax; vec3_t vMid, vMin, vMax;

View file

@ -26,17 +26,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
void LoadM32(const char *name, unsigned char **pic, int *width, int *height) void LoadM32(const char *name, unsigned char **pic, int *width, int *height)
{ {
FILE *f; // FILE *f;
m32_header_t *m32_header; m32_header_t *m32_header;
//rgb_t *palette; //rgb_t *palette;
int i, num_pixels, size; int i, num_pixels, size;
char text_buf[255]; // char text_buf[255];
unsigned int length; unsigned int length;
unsigned char *palette_ent, *buf_temp; unsigned char *palette_ent, *buf_temp;
unsigned char *buffer, *m32_file_buffer; unsigned char *buffer, *m32_file_buffer;
// open file // open file
if ( length = vfsLoadFile ((char *) name, (void **) &m32_file_buffer, 0) == (unsigned int) -1) if ( (length = vfsLoadFile ((char *) name, (void **) &m32_file_buffer, 0)) == (unsigned int) -1)
{ {
Sys_Printf("Unable to open file %s\n",name); Sys_Printf("Unable to open file %s\n",name);
return; return;

View file

@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
void LoadM8(const char *name, unsigned char **pic, int *width, int *height) void LoadM8(const char *name, unsigned char **pic, int *width, int *height)
{ {
FILE *f; // FILE *f;
m8_header_t *m8_header; m8_header_t *m8_header;
rgb_t *palette; rgb_t *palette;
int i, num_pixels, size; int i, num_pixels, size;
@ -44,7 +44,7 @@ void LoadM8(const char *name, unsigned char **pic, int *width, int *height)
strcat(text_buf, ".pcx.m8"); strcat(text_buf, ".pcx.m8");
// open file // open file
if ( length = vfsLoadFile ((char *) text_buf, (void **) &m8_file_buffer, 0) == (unsigned int) -1) if ( (length = vfsLoadFile ((char *) text_buf, (void **) &m8_file_buffer, 0)) == (unsigned int) -1)
{ {
strcpy(text_buf, name); strcpy(text_buf, name);
for(i=(strlen(text_buf)-1); i>0; i--) for(i=(strlen(text_buf)-1); i>0; i--)

View file

@ -30,17 +30,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
void LoadWAL(const char *name, unsigned char **pic, int *width, int *height) void LoadWAL(const char *name, unsigned char **pic, int *width, int *height)
{ {
FILE *f; // FILE *f;
miptex_t *wal_header; miptex_t *wal_header;
rgb_t *palette; // rgb_t *palette;
int i, num_pixels, size; int i, num_pixels, size;
char text_buf[255]; // char text_buf[255];
unsigned int length; unsigned int length;
unsigned char *palette_ent, *buf_temp; unsigned char *palette_ent, *buf_temp;
unsigned char *buffer, *wal_file_buffer; unsigned char *buffer, *wal_file_buffer;
// open file // open file
if ( length = vfsLoadFile ((char *) name, (void **) &wal_file_buffer, 0) == (unsigned int) -1) if ( (length = vfsLoadFile ((char *) name, (void **) &wal_file_buffer, 0)) == (unsigned int) -1)
{ {
Sys_Printf("Unable to open file %s\n",name); Sys_Printf("Unable to open file %s\n",name);
return; return;

View file

@ -569,7 +569,7 @@ bool Primitive_Parse(brush_t *pBrush)
void Entity_Parse(entity_t *pEntity) void Entity_Parse(entity_t *pEntity)
{ {
brush_t *pBrush; brush_t *pBrush;
CPtrArray *brushes = NULL; // CPtrArray *brushes = NULL;
char temptoken[1024]; char temptoken[1024];
char *token = Token(); char *token = Token();

View file

@ -117,7 +117,7 @@ void Face_Write (face_t *face, IDataStream *out, bool bAlternateTexdef = false)
if (g_MapVersion == MAPVERSION_HL) if (g_MapVersion == MAPVERSION_HL)
{ {
char *pos; char *pos;
while ( pos = (char*)strchr( str, '/' ) ) { while ( (pos = (char*)strchr( str, '/' )) != NULL ) {
str = pos+1; // to speed optimize, change the "while" to an "if" str = pos+1; // to speed optimize, change the "while" to an "if"
} }
} }

View file

@ -46,7 +46,7 @@ _QERFileSystemTable g_VFSTable;
_QERScripLibTable g_ScripLibTable; _QERScripLibTable g_ScripLibTable;
_QERBrushTable g_BrushTable; _QERBrushTable g_BrushTable;
static bool g_bInterfaceInitDone = false; // static bool g_bInterfaceInitDone = false;
// ============================================================================= // =============================================================================
// SYNAPSE // SYNAPSE

View file

@ -219,7 +219,7 @@ void IsFaceConflicting()
{ {
texdef_t* tmp_texdef; texdef_t* tmp_texdef;
texdef_to_face_t* temp_texdef_face_list; texdef_to_face_t* temp_texdef_face_list;
char buf[12]; // char buf[12];
char texture_name[128]; char texture_name[128];
if (texdef_face_list_empty()) if (texdef_face_list_empty())
@ -257,7 +257,7 @@ void IsFaceConflicting()
{ {
temp_texdef_face_list = get_texdef_face_list()->next; temp_texdef_face_list = get_texdef_face_list()->next;
for (temp_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) for (; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next)
{ {
tmp_texdef = &temp_texdef_face_list->texdef; tmp_texdef = &temp_texdef_face_list->texdef;
if ( texdef_SI_values.shift[0] != tmp_texdef->shift[0] ) if ( texdef_SI_values.shift[0] != tmp_texdef->shift[0] )
@ -315,7 +315,7 @@ static void PopulateTextureComboList()
texdef_to_face_t* temp_texdef_face_list; texdef_to_face_t* temp_texdef_face_list;
char blank[1]; char blank[1];
GList *items = NULL; GList *items = NULL;
GList *tmp_item; // GList *tmp_item;
int num_of_list_items = 0; int num_of_list_items = 0;
blank[0] = 0; blank[0] = 0;
@ -381,7 +381,7 @@ static void GetTexdefInfo_from_Radiant()
if (!texdef_face_list_empty()) if (!texdef_face_list_empty())
{ {
texdef_to_face_t* p = get_texdef_face_list(); // texdef_to_face_t* p = get_texdef_face_list();
GetSelFacesTexdef( get_texdef_face_list() ); GetSelFacesTexdef( get_texdef_face_list() );
} }
@ -1862,7 +1862,7 @@ static void on_fit_button_clicked (GtkButton *button, gpointer user_data)
static void on_axial_button_clicked (GtkButton *button, gpointer user_data) static void on_axial_button_clicked (GtkButton *button, gpointer user_data)
{ {
texdef_t* tmp_texdef; texdef_t* tmp_texdef;
texdef_t* tmp_orig_texdef; // texdef_t* tmp_orig_texdef;
texdef_to_face_t* temp_texdef_face_list; texdef_to_face_t* temp_texdef_face_list;
if (!texdef_face_list_empty() && g_bListenChanged) if (!texdef_face_list_empty() && g_bListenChanged)

View file

@ -262,7 +262,7 @@ void IsFaceConflicting()
{ {
temp_texdef_face_list = get_texdef_face_list()->next; temp_texdef_face_list = get_texdef_face_list()->next;
for (temp_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) for (; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next)
{ {
tmp_texdef = &temp_texdef_face_list->texdef; tmp_texdef = &temp_texdef_face_list->texdef;
if ( texdef_SI_values.shift[0] != tmp_texdef->shift[0] ) if ( texdef_SI_values.shift[0] != tmp_texdef->shift[0] )

View file

@ -224,7 +224,7 @@ void IsFaceConflicting()
{ {
texdef_t* tmp_texdef; texdef_t* tmp_texdef;
texdef_to_face_t* temp_texdef_face_list; texdef_to_face_t* temp_texdef_face_list;
char buf[12]; // char buf[12];
char texture_name[128]; char texture_name[128];
if (texdef_face_list_empty()) if (texdef_face_list_empty())
@ -262,7 +262,7 @@ void IsFaceConflicting()
{ {
temp_texdef_face_list = get_texdef_face_list()->next; temp_texdef_face_list = get_texdef_face_list()->next;
for (temp_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) for (; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next)
{ {
tmp_texdef = &temp_texdef_face_list->texdef; tmp_texdef = &temp_texdef_face_list->texdef;
if ( texdef_SI_values.shift[0] != tmp_texdef->shift[0] ) if ( texdef_SI_values.shift[0] != tmp_texdef->shift[0] )
@ -320,7 +320,7 @@ static void PopulateTextureComboList()
texdef_to_face_t* temp_texdef_face_list; texdef_to_face_t* temp_texdef_face_list;
char blank[1]; char blank[1];
GList *items = NULL; GList *items = NULL;
GList *tmp_item; // GList *tmp_item;
int num_of_list_items = 0; int num_of_list_items = 0;
blank[0] = 0; blank[0] = 0;
@ -386,7 +386,7 @@ static void GetTexdefInfo_from_Radiant()
if (!texdef_face_list_empty()) if (!texdef_face_list_empty())
{ {
texdef_to_face_t* p = get_texdef_face_list(); // texdef_to_face_t* p = get_texdef_face_list();
GetSelFacesTexdef( get_texdef_face_list() ); GetSelFacesTexdef( get_texdef_face_list() );
} }
@ -1875,7 +1875,7 @@ static void on_fit_button_clicked (GtkButton *button, gpointer user_data)
static void on_axial_button_clicked (GtkButton *button, gpointer user_data) static void on_axial_button_clicked (GtkButton *button, gpointer user_data)
{ {
texdef_t* tmp_texdef; texdef_t* tmp_texdef;
texdef_t* tmp_orig_texdef; // texdef_t* tmp_orig_texdef;
texdef_to_face_t* temp_texdef_face_list; texdef_to_face_t* temp_texdef_face_list;
if (!texdef_face_list_empty() && g_bListenChanged) if (!texdef_face_list_empty() && g_bListenChanged)

View file

@ -262,7 +262,7 @@ void IsFaceConflicting()
{ {
temp_texdef_face_list = get_texdef_face_list()->next; temp_texdef_face_list = get_texdef_face_list()->next;
for (temp_texdef_face_list; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next) for (; temp_texdef_face_list; temp_texdef_face_list = temp_texdef_face_list->next)
{ {
tmp_texdef = &temp_texdef_face_list->texdef; tmp_texdef = &temp_texdef_face_list->texdef;
if ( texdef_SI_values.shift[0] != tmp_texdef->shift[0] ) if ( texdef_SI_values.shift[0] != tmp_texdef->shift[0] )

View file

@ -264,6 +264,8 @@ void Texture_SetMode(int iMenu)
iMode = -1; iMode = -1;
texturing = false; texturing = false;
break; break;
default:
return;
} }
g_qeglobals.d_savedinfo.iTexMenu = iMenu; g_qeglobals.d_savedinfo.iTexMenu = iMenu;