Browse Source

engine: fix warnings

pull/2/head
Alibek Omarov 6 years ago
parent
commit
48d1aa5115
  1. 1
      common/net_api.h
  2. 8
      engine/cdll_exp.h
  3. 2
      engine/client/cl_main.c
  4. 3
      engine/client/console.c
  5. 2
      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

1
common/net_api.h

@ -28,6 +28,7 @@
// kill the request hook after receiving the first response // kill the request hook after receiving the first response
#define FNETAPI_MULTIPLE_RESPONSE ( 1<<0 ) #define FNETAPI_MULTIPLE_RESPONSE ( 1<<0 )
struct net_response_s;
typedef void (*net_api_response_func_t) ( struct net_response_s *response ); typedef void (*net_api_response_func_t) ( struct net_response_s *response );
#define NET_SUCCESS ( 0 ) #define NET_SUCCESS ( 0 )

8
engine/cdll_exp.h

@ -15,6 +15,14 @@ GNU General Public License for more details.
#ifndef CDLL_EXP_H #ifndef CDLL_EXP_H
#define 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! // NOTE: ordering is important!
typedef struct cldll_func_s typedef struct cldll_func_s
{ {

2
engine/client/cl_main.c

@ -1839,7 +1839,7 @@ void CL_ConnectionlessPacket( netadr_t from, sizebuf_t *msg )
{ {
// packet was sucessfully delivered, adjust the fragment size and get challenge // 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" ); Netchan_OutOfBandPrint( NS_CLIENT, from, "getchallenge\n" );
Cvar_SetValue( "cl_dlmax", cls.max_fragment_size ); Cvar_SetValue( "cl_dlmax", cls.max_fragment_size );
cls.connect_time = host.realtime; cls.connect_time = host.realtime;

3
engine/client/console.c

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

2
engine/client/gl_sprite.c

@ -243,7 +243,7 @@ void Mod_LoadSpriteModel( model_t *mod, const void *buffer, qboolean *loaded, ui
// install palette // install palette
switch( psprite->texFormat ) switch( psprite->texFormat )
{ {
case SPR_INDEXALPHA: case SPR_INDEXALPHA:
pal = FS_LoadImage( "#gradient.pal", src, 768 ); pal = FS_LoadImage( "#gradient.pal", src, 768 );
break; break;
case SPR_ALPHTEST: case SPR_ALPHTEST:

2
engine/common/filesystem.c

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

2
engine/common/masterlist.c

@ -92,7 +92,7 @@ NET_AddMaster
Add master to the list 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; master_t *master, *last;

2
engine/common/zone.c

@ -307,7 +307,7 @@ void Mem_PrintStats( void )
realsize += pool->realsize; 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 )); Con_Printf( "total allocated size: ^1%s\n", Q_memprint( realsize ));
} }

6
engine/eiface.h

@ -393,6 +393,12 @@ typedef struct
#undef ARRAYSIZE #undef ARRAYSIZE
#define ARRAYSIZE(p) (sizeof(p)/sizeof(p[0])) #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 typedef struct
{ {
// Initialize/shutdown the game (one-time call after loading of game .dll ) // 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
char maptitle[64]; // title of active map char maptitle[64]; // title of active map
} ui_globalvars_t; } ui_globalvars_t;
struct ref_viewpass_s;
typedef struct ui_enginefuncs_s typedef struct ui_enginefuncs_s
{ {
// image handlers // image handlers

Loading…
Cancel
Save