mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-16 06:00:33 +01:00
engine: fix -Wincompatible-pointer-types, add it to Werror list
This commit is contained in:
parent
08e7bb1bf4
commit
c07109e69c
@ -612,7 +612,7 @@ void R_CollectRendererNames( void )
|
|||||||
pfn = COM_GetProcAddress( dll, GET_REF_HUMANREADABLE_NAME );
|
pfn = COM_GetProcAddress( dll, GET_REF_HUMANREADABLE_NAME );
|
||||||
if( !pfn ) // just in case
|
if( !pfn ) // just in case
|
||||||
{
|
{
|
||||||
Con_Reportf( "R_CollectRendererNames: can't find GetHumanReadableName export in %s\n", temp, COM_GetLibraryError() );
|
Con_Reportf( "R_CollectRendererNames: can't find GetHumanReadableName export in %s\n", temp );
|
||||||
Q_strncpy( ref.readableNames[i], renderers[i], sizeof( ref.readableNames[i] ));
|
Q_strncpy( ref.readableNames[i], renderers[i], sizeof( ref.readableNames[i] ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -595,7 +595,7 @@ void Cvar_Set( const char *var_name, const char *value )
|
|||||||
if( !var_name )
|
if( !var_name )
|
||||||
{
|
{
|
||||||
// there is an error in C code if this happens
|
// there is an error in C code if this happens
|
||||||
Con_Printf( "Cvar_Set: passed NULL variable name\n", var_name );
|
Con_Printf( "Cvar_Set: passed NULL variable name\n" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,7 +649,7 @@ float Cvar_VariableValue( const char *var_name )
|
|||||||
if( !var_name )
|
if( !var_name )
|
||||||
{
|
{
|
||||||
// there is an error in C code if this happens
|
// there is an error in C code if this happens
|
||||||
Con_Printf( "Cvar_VariableValue: passed NULL variable name\n", var_name );
|
Con_Printf( "Cvar_VariableValue: passed NULL variable name\n" );
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,7 +686,7 @@ const char *Cvar_VariableString( const char *var_name )
|
|||||||
if( !var_name )
|
if( !var_name )
|
||||||
{
|
{
|
||||||
// there is an error in C code if this happens
|
// there is an error in C code if this happens
|
||||||
Con_Printf( "Cvar_VariableString: passed NULL variable name\n", var_name );
|
Con_Printf( "Cvar_VariableString: passed NULL variable name\n" );
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ static void COM_GenerateServerLibraryPath( char *out, size_t size )
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
string dllpath;
|
string dllpath;
|
||||||
char *ext;
|
const char *ext;
|
||||||
|
|
||||||
#if XASH_WIN32
|
#if XASH_WIN32
|
||||||
Q_strncpy( dllpath, GI->game_dll, sizeof( dllpath ) );
|
Q_strncpy( dllpath, GI->game_dll, sizeof( dllpath ) );
|
||||||
|
@ -65,14 +65,14 @@ typedef struct
|
|||||||
dleaf_t *leafs;
|
dleaf_t *leafs;
|
||||||
dleaf32_t *leafs32;
|
dleaf32_t *leafs32;
|
||||||
};
|
};
|
||||||
int numleafs;
|
size_t numleafs;
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
dclipnode_t *clipnodes;
|
dclipnode_t *clipnodes;
|
||||||
dclipnode32_t *clipnodes32;
|
dclipnode32_t *clipnodes32;
|
||||||
};
|
};
|
||||||
int numclipnodes;
|
size_t numclipnodes;
|
||||||
|
|
||||||
dtexinfo_t *texinfo;
|
dtexinfo_t *texinfo;
|
||||||
size_t numtexinfo;
|
size_t numtexinfo;
|
||||||
|
@ -97,7 +97,7 @@ static int ioctl_stub( int d, unsigned long r, ... )
|
|||||||
#define closesocket close
|
#define closesocket close
|
||||||
#define SOCKET int
|
#define SOCKET int
|
||||||
#define INVALID_SOCKET -1
|
#define INVALID_SOCKET -1
|
||||||
typedef size_t WSAsize_t;
|
typedef socklen_t WSAsize_t;
|
||||||
#else // WIN32
|
#else // WIN32
|
||||||
typedef int WSAsize_t; // for some reason, MS has signed size. We won't exceed 2^32, probably, so just typedef it
|
typedef int WSAsize_t; // for some reason, MS has signed size. We won't exceed 2^32, probably, so just typedef it
|
||||||
#endif
|
#endif
|
||||||
|
@ -87,7 +87,7 @@ static const dframetype_t *R_SpriteLoadFrame( model_t *mod, const void *pin, msp
|
|||||||
pspriteframe->gl_texturenum = gl_texturenum;
|
pspriteframe->gl_texturenum = gl_texturenum;
|
||||||
*ppframe = pspriteframe;
|
*ppframe = pspriteframe;
|
||||||
|
|
||||||
return ( const dspriteframe_t* )(( const byte* )pin + sizeof( dspriteframe_t ) + pinframe.width * pinframe.height * bytes );
|
return ( const dframetype_t* )(( const byte* )pin + sizeof( dspriteframe_t ) + pinframe.width * pinframe.height * bytes );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
1
wscript
1
wscript
@ -235,6 +235,7 @@ def configure(conf):
|
|||||||
'-Werror=duplicated-branches', # BEWARE: buggy
|
'-Werror=duplicated-branches', # BEWARE: buggy
|
||||||
'-Werror=bool-compare',
|
'-Werror=bool-compare',
|
||||||
'-Werror=bool-operation',
|
'-Werror=bool-operation',
|
||||||
|
'-Werror=incompatible-pointer-types',
|
||||||
# '-Wdouble-promotion', # disable warning flood
|
# '-Wdouble-promotion', # disable warning flood
|
||||||
'-Wstrict-aliasing',
|
'-Wstrict-aliasing',
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user