engine: fix -Werror=strict-prototypes

This commit is contained in:
Alibek Omarov 2019-10-05 02:07:49 +03:00
parent 5a8de90918
commit dc207a449c
17 changed files with 37 additions and 38 deletions

View File

@ -213,14 +213,14 @@ typedef struct cl_enginefuncs_s
int (*pfnRandomLong)( int lLow, int lHigh );
void (*pfnHookEvent)( const char *name, void ( *pfnEvent )( struct event_args_s *args ));
int (*Con_IsVisible) ();
int (*Con_IsVisible) ( void );
const char *(*pfnGetGameDirectory)( void );
struct cvar_s *(*pfnGetCvarPointer)( const char *szName );
const char *(*Key_LookupBinding)( const char *pBinding );
const char *(*pfnGetLevelName)( void );
void (*pfnGetScreenFade)( struct screenfade_s *fade );
void (*pfnSetScreenFade)( struct screenfade_s *fade );
void* (*VGui_GetPanel)( );
void* (*VGui_GetPanel)( void );
void (*VGui_ViewportPaintBackground)( int extents[4] );
byte* (*COM_LoadFile)( const char *path, int usehunk, int *pLength );

View File

@ -2061,7 +2061,7 @@ void CL_ReadPointFile_f( void )
else Con_Printf( "map %s has no leaks!\n", clgame.mapname );
}
void CL_FreeDeadBeams()
void CL_FreeDeadBeams( void )
{
BEAM *pBeam, *pNext, *pPrev = NULL;
// draw temporary entity beams

View File

@ -44,7 +44,7 @@ static void pfnVibrate( float life, char flags )
Platform_Vibrate( life * vibration_length->value, flags );
}
static void Vibrate_f()
static void Vibrate_f( void )
{
if( Cmd_Argc() != 2 )
{

View File

@ -536,7 +536,7 @@ static qboolean R_LoadRenderer( const char *refopt )
return true;
}
static void SetWidthAndHeightFromCommandLine()
static void SetWidthAndHeightFromCommandLine( void )
{
int width, height;
@ -552,7 +552,7 @@ static void SetWidthAndHeightFromCommandLine()
R_SaveVideoMode( width, height );
}
static void SetFullscreenModeFromCommandLine( )
static void SetFullscreenModeFromCommandLine( void )
{
#ifndef __ANDROID__
if ( Sys_CheckParm("-fullscreen") )

View File

@ -533,19 +533,19 @@ void VGui_MouseMove( int x, int y )
vgui.MouseMove( x / xscale, y / yscale );
}
void VGui_Paint()
void VGui_Paint( void )
{
if(vgui.initialized)
vgui.Paint();
}
void VGui_RunFrame()
void VGui_RunFrame( void )
{
//stub
}
void *GAME_EXPORT VGui_GetPanel()
void *GAME_EXPORT VGui_GetPanel( void )
{
if( vgui.initialized )
return vgui.GetPanel();

View File

@ -27,12 +27,12 @@ extern "C" {
//
void VGui_Startup( const char *clientlib, int width, int height );
void VGui_Shutdown( void );
void VGui_Paint();
void VGui_RunFrame();
void VGui_Paint( void );
void VGui_RunFrame( void );
void VGui_KeyEvent( int key, int down );
void VGui_MouseMove( int x, int y );
qboolean VGui_IsActive( void );
void *VGui_GetPanel();
void *VGui_GetPanel( void );
#ifdef __cplusplus
}
#endif

View File

@ -161,7 +161,7 @@ static void VID_Mode_f( void )
R_ChangeDisplaySettings( w, h, Cvar_VariableInteger( "fullscreen" ) );
}
void VID_Init()
void VID_Init( void )
{
// system screen width and height (don't suppose for change from console at all)
Cvar_Get( "width", "0", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "screen width" );

View File

@ -564,7 +564,7 @@ uint ID_CheckRawId( bloomfilter_t filter )
#define SYSTEM_XOR_MASK 0x10331c2dce4c91db
#define GAME_XOR_MASK 0x7ffc48fbac1711f1
void ID_Check()
void ID_Check( void )
{
uint weight = BloomFilter_Weight( id );
uint mincount = weight >> 2;
@ -588,7 +588,7 @@ void ID_Check()
#endif
}
const char *ID_GetMD5()
const char *ID_GetMD5( void )
{
if( id_customid[0] )
return id_customid;

View File

@ -20,12 +20,12 @@ GNU General Public License for more details.
static char s_szLastError[1024] = "";
const char *COM_GetLibraryError()
const char *COM_GetLibraryError( void )
{
return s_szLastError;
}
void COM_ResetLibraryError()
void COM_ResetLibraryError( void )
{
s_szLastError[0] = 0;
}

View File

@ -3091,7 +3091,7 @@ void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h,
/* Allocate the tdefl_compressor and tinfl_decompressor structures in C so that */
/* non-C language bindings to tdefL_ and tinfl_ API don't need to worry about */
/* structure size and allocation mechanism. */
tdefl_compressor *tdefl_compressor_alloc()
tdefl_compressor *tdefl_compressor_alloc( void )
{
return (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor));
}
@ -3832,7 +3832,7 @@ int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size,
}
#ifndef MINIZ_NO_MALLOC
tinfl_decompressor *tinfl_decompressor_alloc()
tinfl_decompressor *tinfl_decompressor_alloc( void )
{
tinfl_decompressor *pDecomp = (tinfl_decompressor *)MZ_MALLOC(sizeof(tinfl_decompressor));
if (pDecomp)

View File

@ -49,7 +49,7 @@ double GAME_EXPORT Sys_DoubleTime( void )
#if defined __linux__ || ( defined _WIN32 && !defined XASH_64BIT )
#undef DEBUG_BREAK
qboolean Sys_DebuggerPresent(); // see sys_linux.c
qboolean Sys_DebuggerPresent( void ); // see sys_linux.c
#ifdef _MSC_VER
#define DEBUG_BREAK \
if( Sys_DebuggerPresent() ) \

View File

@ -100,15 +100,15 @@ qboolean R_Init_Video( const int type );
void R_Free_Video( void );
qboolean VID_SetMode( void );
rserr_t R_ChangeDisplaySettings( int width, int height, qboolean fullscreen );
int R_MaxVideoModes();
int R_MaxVideoModes( void );
vidmode_t*R_GetVideoMode( int num );
void* GL_GetProcAddress( const char *name ); // RenderAPI requirement
void GL_UpdateSwapInterval( void );
int GL_SetAttribute( int attr, int val );
int GL_GetAttribute( int attr, int *val );
void GL_SwapBuffers();
void *SW_LockBuffer();
void SW_UnlockBuffer();
void GL_SwapBuffers( void );
void *SW_LockBuffer( void );
void SW_UnlockBuffer( void );
qboolean SW_CreateBuffer( int width, int height, uint *stride, uint *bpp, uint *r, uint *g, uint *b );
/*

View File

@ -143,7 +143,7 @@ qboolean SW_CreateBuffer( int width, int height, uint *stride, uint *bpp, uint *
return false;
}
void *SW_LockBuffer()
void *SW_LockBuffer( void )
{
if( sw.renderer )
{
@ -181,7 +181,7 @@ void *SW_LockBuffer()
}
}
void SW_UnlockBuffer()
void SW_UnlockBuffer( void )
{
if( sw.renderer )
{
@ -713,8 +713,7 @@ static void GL_SetupAttributes( void )
ref.dllFuncs.GL_SetupAttributes( glw_state.safe );
}
void GL_SwapBuffers()
void GL_SwapBuffers( void )
{
SDL_GL_SwapWindow( host.hWnd );
}

View File

@ -279,7 +279,7 @@ typedef struct ref_api_s
void (*CL_CenterPrint)( const char *s, float y );
void (*Con_DrawStringLen)( const char *pText, int *length, int *height );
int (*Con_DrawString)( int x, int y, const char *string, rgba_t setColor );
void (*CL_DrawCenterPrint)();
void (*CL_DrawCenterPrint)( void );
// entity management
struct cl_entity_s *(*GetLocalPlayer)( void );
@ -377,12 +377,12 @@ typedef struct ref_api_s
int (*GL_SetAttribute)( int attr, int value );
int (*GL_GetAttribute)( int attr, int *value );
void *(*GL_GetProcAddress)( const char *name );
void (*GL_SwapBuffers)();
void (*GL_SwapBuffers)( void );
// SW
qboolean (*SW_CreateBuffer)( int width, int height, uint *stride, uint *bpp, uint *r, uint *g, uint *b );
void *(*SW_LockBuffer)();
void (*SW_UnlockBuffer)();
void *(*SW_LockBuffer)( void );
void (*SW_UnlockBuffer)( void );
// gamma
void (*BuildGammaTable)( float lightgamma, float brightness );

View File

@ -430,8 +430,8 @@ void GL_RebuildLightmaps( void );
void GL_InitRandomTable( void );
void GL_BuildLightmaps( void );
void GL_ResetFogColor( void );
void R_GenerateVBO();
void R_ClearVBO();
void R_GenerateVBO( void );
void R_ClearVBO( void );
void R_AddDecalVBO( decal_t *pdecal, msurface_t *surf );
//

View File

@ -587,7 +587,7 @@ void GL_InitExtensionsGLES( void )
}
}
#else
void GL_InitExtensionsBigGL()
void GL_InitExtensionsBigGL( void )
{
// intialize wrapper type
glConfig.context = CONTEXT_TYPE_GL;

View File

@ -653,7 +653,7 @@ static int LM_AllocBlock( int w, int h, int *x, int *y )
return true;
}
static void LM_UploadDynamicBlock()
static void LM_UploadDynamicBlock( void )
{
int height = 0, i;
@ -1781,7 +1781,7 @@ R_GenerateVBO
Allocate memory for arrays, fill it with vertex attribs and upload to GPU
===================
*/
void R_GenerateVBO()
void R_GenerateVBO( void )
{
int numtextures = WORLDMODEL->numtextures;
int numlightmaps = gl_lms.current_lightmap_texture;
@ -2033,7 +2033,7 @@ R_ClearVBO
free all vbo data
=============
*/
void R_ClearVBO()
void R_ClearVBO( void )
{
vboarray_t *vbo;