fix warnings

This commit is contained in:
Garux 2021-01-03 06:24:58 +03:00
parent 77439d8b66
commit e62c6f4bb3
15 changed files with 14 additions and 32 deletions

View File

@ -88,13 +88,11 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
class ForEachFace : public BrushVisitor
{
Brush &m_brush;
public:
mutable int m_contentFlagsVis;
mutable int m_surfaceFlagsVis;
ForEachFace( Brush& brush )
: m_brush( brush ){
ForEachFace() {
m_contentFlagsVis = -1;
m_surfaceFlagsVis = -1;
}
@ -136,7 +134,7 @@ BrushGetLevel( brushlist_t& brushlist, int flag, bool content, bool notset, bool
bool pre( const scene::Path& path, scene::Instance& instance ) const {
Brush* brush = Node_getBrush( path.top() );
if ( brush != 0 ) {
ForEachFace faces( *brush );
ForEachFace faces;
brush->forEachFace( faces );
// contentflags?
if ( m_content ) {

View File

@ -28,13 +28,6 @@
* GTK callback functions
*/
class UFOAIGtk
{
GtkWindow* m_gtk_window;
public:
UFOAIGtk( void* gtk_window ) : m_gtk_window( ( GtkWindow* )gtk_window ){
}
};
#if 0
/**

View File

@ -447,7 +447,7 @@ static picoModel_t *_fm_load( PM_PARAMS_LOAD ){
#endif
continue;
}
else if ( ( p_index_LUT[triangle->index_xyz[j]].next == NULL ) ) { // Not equal to Main entry, and no LL entry
else if ( p_index_LUT[triangle->index_xyz[j]].next == NULL ) { // Not equal to Main entry, and no LL entry
// Add first entry of LL from Main
p_index_LUT2 = (index_LUT_t *)_pico_alloc( sizeof( index_LUT_t ) );
if ( p_index_LUT2 == NULL ) {

View File

@ -55,7 +55,6 @@ private:
CopiedString m_savefilename;
xmlDocPtr doc;
xmlXPathContextPtr context;
xmlNodeSetPtr nodePtr;
xmlXPathObjectPtr XpathEval( const char* queryString ){
const xmlChar* expression = (const xmlChar*)queryString;

View File

@ -317,9 +317,6 @@ public:
class BrushHollowSelectedWalker : public scene::Graph::Walker {
HollowSettings& m_settings;
float offset;
EHollowType HollowType;
public:
BrushHollowSelectedWalker( HollowSettings& settings )
: m_settings( settings ) {

View File

@ -241,7 +241,7 @@ void CGameDialog::DoGameDialog(){
}
CGameDescription* CGameDialog::GameDescriptionForComboItem(){
return ( m_nComboSelect >= 0 && m_nComboSelect < mGames.size() )?
return ( m_nComboSelect >= 0 && m_nComboSelect < static_cast<int>( mGames.size() ) )?
*std::next( mGames.begin(), m_nComboSelect )
: 0; // not found
}

View File

@ -19,7 +19,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if !defined( INCLUDEDE_SCENEGRAPH_H )
#if !defined( INCLUDED_SCENEGRAPH_H )
#define INCLUDED_SCENEGRAPH_H
#endif

View File

@ -105,7 +105,6 @@ std::size_t m_iCurrentStep;
char *m_sBSPName;
// buffer we use in push mode to receive data directly from the network
xmlParserInputBufferPtr m_xmlInputBuffer;
xmlParserInputPtr m_xmlInput;
xmlParserCtxtPtr m_xmlParserCtxt;
// call this to switch the set listening mode
bool SetupListening();

View File

@ -201,8 +201,6 @@ Vector3 m_vOrigin;
View m_view;
static Shader* m_state_selected;
int m_ptCursorX, m_ptCursorY;
unsigned int m_buttonstate;
int m_nNewBrushPressx;

View File

@ -607,7 +607,7 @@ FILE *SafeOpenWrite (char *filename)
return f;
}
FILE *SafeOpenRead (char *filename)
FILE *SafeOpenRead (const char *filename)
{
FILE *f;
@ -655,7 +655,7 @@ qboolean FileExists (char *filename)
LoadFile
==============
*/
int LoadFile (char *filename, void **bufferptr, int offset, int length)
int LoadFile (const char *filename, void **bufferptr, int offset, int length)
{
FILE *f;
void *buffer;
@ -1189,7 +1189,7 @@ void FS_FreeFile(void *buf)
int FS_ReadFileAndCache(const char *qpath, void **buffer)
{
return LoadFile((char *) qpath, buffer, 0, 0);
return LoadFile(qpath, buffer, 0, 0);
} //end of the function FS_ReadFileAndCache
int FS_FOpenFileRead( const char *filename, FILE **file, qboolean uniqueFILE )

View File

@ -69,11 +69,11 @@ void Warning(char *warning, ...);
int CheckParm (char *check);
FILE *SafeOpenWrite (char *filename);
FILE *SafeOpenRead (char *filename);
FILE *SafeOpenRead (const char *filename);
void SafeRead (FILE *f, void *buffer, int count);
void SafeWrite (FILE *f, void *buffer, int count);
int LoadFile (char *filename, void **bufferptr, int offset, int length);
int LoadFile (const char *filename, void **bufferptr, int offset, int length);
int TryLoadFile (char *filename, void **bufferptr);
void SaveFile (char *filename, void *buffer, int count);
qboolean FileExists (char *filename);

View File

@ -1932,7 +1932,7 @@ extern int unzReadCurrentFile (unzFile file, void *buf, unsigned len)
return UNZ_PARAMERROR;
if ((pfile_in_zip_read_info->read_buffer == NULL))
if (pfile_in_zip_read_info->read_buffer == NULL)
return UNZ_END_OF_LIST_OF_FILE;
if (len==0)
return 0;

View File

@ -134,8 +134,7 @@ void LokiInitPaths( char *argv0 ){
path = getenv( "PATH" );
/* minor setup */
last[ 0 ] = path[ 0 ];
last[ 1 ] = '\0';
last = path;
found = false;
/* go through each : segment of path */

View File

@ -135,8 +135,7 @@ void LokiInitPaths( char *argv0 ){
path = getenv( "PATH" );
/* minor setup */
last[ 0 ] = path[ 0 ];
last[ 1 ] = '\0';
last = path;
found = false;
/* go through each : segment of path */

View File

@ -2102,7 +2102,7 @@ extern int unzReadCurrentFile (unzFile file, void *buf, unsigned len)
return UNZ_PARAMERROR;
if ((pfile_in_zip_read_info->read_buffer == NULL))
if (pfile_in_zip_read_info->read_buffer == NULL)
return UNZ_END_OF_LIST_OF_FILE;
if (len==0)
return 0;