Browse Source

engine: fix warnings

pull/2/head
Alibek Omarov 6 years ago
parent
commit
48d1aa5115
  1. 3
      common/net_api.h
  2. 8
      engine/cdll_exp.h
  3. 2
      engine/client/cl_main.c
  4. 3
      engine/client/console.c
  5. 4
      engine/client/gl_sprite.c
  6. 2
      engine/common/filesystem.c
  7. 2
      engine/common/masterlist.c
  8. 2
      engine/common/zone.c
  9. 6
      engine/eiface.h
  10. 2
      engine/menu_int.h

3
common/net_api.h

@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
// kill the request hook after receiving the first response
#define FNETAPI_MULTIPLE_RESPONSE ( 1<<0 )
struct net_response_s;
typedef void (*net_api_response_func_t) ( struct net_response_s *response );
#define NET_SUCCESS ( 0 )
@ -94,4 +95,4 @@ typedef struct net_api_s @@ -94,4 +95,4 @@ typedef struct net_api_s
void (*SetValueForKey)( char *s, const char *key, const char *value, int maxsize );
} net_api_t;
#endif//NET_APIH
#endif//NET_APIH

8
engine/cdll_exp.h

@ -15,6 +15,14 @@ GNU General Public License for more details. @@ -15,6 +15,14 @@ GNU General Public License for more details.
#ifndef CDLL_EXP_H
#define CDLL_EXP_H
struct tempent_s;
struct usercmd_s;
struct physent_s;
struct playermove_s;
struct mstudioevent_s;
struct engine_studio_api_s;
struct r_studio_interface_s;
// NOTE: ordering is important!
typedef struct cldll_func_s
{

2
engine/client/cl_main.c

@ -1839,7 +1839,7 @@ void CL_ConnectionlessPacket( netadr_t from, sizebuf_t *msg ) @@ -1839,7 +1839,7 @@ void CL_ConnectionlessPacket( netadr_t from, sizebuf_t *msg )
{
// packet was sucessfully delivered, adjust the fragment size and get challenge
Con_DPrintf( "CRC %p is matched, get challenge, fragment size %d\n", crcValue, cls.max_fragment_size );
Con_DPrintf( "CRC %x is matched, get challenge, fragment size %d\n", crcValue, cls.max_fragment_size );
Netchan_OutOfBandPrint( NS_CLIENT, from, "getchallenge\n" );
Cvar_SetValue( "cl_dlmax", cls.max_fragment_size );
cls.connect_time = host.realtime;

3
engine/client/console.c

@ -122,6 +122,7 @@ typedef struct @@ -122,6 +122,7 @@ typedef struct
static console_t con;
void Con_ClearField( field_t *edit );
void Field_CharEvent( field_t *edit, int ch );
/*
@ -1388,7 +1389,7 @@ EDIT FIELDS @@ -1388,7 +1389,7 @@ EDIT FIELDS
Con_ClearField
================
*/
void Con_ClearField(field_t *edit)
void Con_ClearField( field_t *edit )
{
memset(edit->buffer, 0, MAX_STRING);
edit->cursor = 0;

4
engine/client/gl_sprite.c

@ -243,7 +243,7 @@ void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, ui @@ -243,7 +243,7 @@ void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, ui
// install palette
switch( psprite->texFormat )
{
case SPR_INDEXALPHA:
case SPR_INDEXALPHA:
pal = FS_LoadImage( "#gradient.pal", src, 768 );
break;
case SPR_ALPHTEST:
@ -1092,4 +1092,4 @@ void R_DrawSpriteModel( cl_entity_t *e ) @@ -1092,4 +1092,4 @@ void R_DrawSpriteModel( cl_entity_t *e )
pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
pglEnable( GL_DEPTH_TEST );
}
}
}

2
engine/common/filesystem.c

@ -2500,7 +2500,7 @@ Filename are relative to the xash directory. @@ -2500,7 +2500,7 @@ Filename are relative to the xash directory.
Always appends a 0 byte.
============
*/
byte *FS_LoadDirectFile(const char *path, long *filesizeptr )
byte *FS_LoadDirectFile( const char *path, long *filesizeptr )
{
file_t *file;
byte *buf = NULL;

2
engine/common/masterlist.c

@ -92,7 +92,7 @@ NET_AddMaster @@ -92,7 +92,7 @@ NET_AddMaster
Add master to the list
========================
*/
static void NET_AddMaster( char *addr, qboolean save )
static void NET_AddMaster( const char *addr, qboolean save )
{
master_t *master, *last;

2
engine/common/zone.c

@ -307,7 +307,7 @@ void Mem_PrintStats( void ) @@ -307,7 +307,7 @@ void Mem_PrintStats( void )
realsize += pool->realsize;
}
Con_Printf( "^3%lu^7 memory pools, totalling: ^1%s\n", (dword)count, Q_memprint( size ));
Con_Printf( "^3%lu^7 memory pools, totalling: ^1%s\n", count, Q_memprint( size ));
Con_Printf( "total allocated size: ^1%s\n", Q_memprint( realsize ));
}

6
engine/eiface.h

@ -393,6 +393,12 @@ typedef struct @@ -393,6 +393,12 @@ typedef struct
#undef ARRAYSIZE
#define ARRAYSIZE(p) (sizeof(p)/sizeof(p[0]))
struct weapon_data_s;
struct playermove_s;
struct clientdata_s;
struct usercmd_s;
struct edict_s;
typedef struct
{
// Initialize/shutdown the game (one-time call after loading of game .dll )

2
engine/menu_int.h

@ -47,6 +47,8 @@ typedef struct ui_globalvars_s @@ -47,6 +47,8 @@ typedef struct ui_globalvars_s
char maptitle[64]; // title of active map
} ui_globalvars_t;
struct ref_viewpass_s;
typedef struct ui_enginefuncs_s
{
// image handlers

Loading…
Cancel
Save