Browse Source

engine: client/common: fix a few more format warnings

pull/2/head
iZarif 5 years ago committed by Alibek Omarov
parent
commit
bf8b87c29d
  1. 4
      engine/client/ref_common.c
  2. 2
      engine/client/s_vox.c
  3. 2
      engine/common/con_utils.c
  4. 2
      engine/common/filesystem.c
  5. 2
      engine/common/imagelib/img_dds.c
  6. 2
      engine/common/lib_common.c
  7. 12
      engine/common/mod_bmodel.c

4
engine/client/ref_common.c

@ -443,7 +443,7 @@ static qboolean R_LoadProgs( const char *name ) @@ -443,7 +443,7 @@ static qboolean R_LoadProgs( const char *name )
if( !( GetRefAPI = (REFAPI)COM_GetProcAddress( ref.hInstance, GET_REF_API )) )
{
COM_FreeLibrary( ref.hInstance );
Con_Reportf( "R_LoadProgs: can't find GetRefAPI entry point in %s: %s\n", name );
Con_Reportf( "R_LoadProgs: can't find GetRefAPI entry point in %s\n", name );
ref.hInstance = NULL;
return false;
}
@ -599,7 +599,7 @@ void R_CollectRendererNames( void ) @@ -599,7 +599,7 @@ void R_CollectRendererNames( void )
pfn = COM_GetProcAddress( dll, GET_REF_API );
if( !pfn )
{
Con_Reportf( "R_CollectRendererNames: can't find API entry point in %s\n", temp, COM_GetLibraryError() );
Con_Reportf( "R_CollectRendererNames: can't find API entry point in %s\n", temp );
COM_FreeLibrary( dll );
continue;
}

2
engine/client/s_vox.c

@ -546,7 +546,7 @@ void VOX_ParseLineCommands( char *pSentenceData, int sentenceIndex ) @@ -546,7 +546,7 @@ void VOX_ParseLineCommands( char *pSentenceData, int sentenceIndex )
length = pNext - pSentenceData;
if( tempBufferPos + length > sizeof( tempBuffer ))
{
Con_Printf( S_ERROR "Sentence too long (max length %d characters)\n", sizeof(tempBuffer) - 1 );
Con_Printf( S_ERROR "Sentence too long (max length %lu characters)\n", sizeof(tempBuffer) - 1 );
return;
}

2
engine/common/con_utils.c

@ -563,7 +563,7 @@ qboolean Cmd_GetKeysList( const char *s, char *completedname, int length ) @@ -563,7 +563,7 @@ qboolean Cmd_GetKeysList( const char *s, char *completedname, int length )
Con_Printf( "%16s\n", matchbuf );
}
Con_Printf( "\n^3 %i keys found.\n", numkeys );
Con_Printf( "\n^3 %lu keys found.\n", numkeys );
if( completedname && length )
{

2
engine/common/filesystem.c

@ -1347,7 +1347,7 @@ static void FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo ) @@ -1347,7 +1347,7 @@ static void FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo )
FS_Printf( f, "version\t\t%g\n", GameInfo->version );
if( GameInfo->size != 0 )
FS_Printf( f, "size\t\t%i\n", GameInfo->size );
FS_Printf( f, "size\t\t%lu\n", GameInfo->size );
if( Q_strlen( GameInfo->game_url ))
FS_Printf( f, "url_info\t\t\"%s\"\n", GameInfo->game_url );

2
engine/common/imagelib/img_dds.c

@ -225,7 +225,7 @@ uint Image_DXTCalcSize( const char *name, dds_t *hdr, size_t filesize ) @@ -225,7 +225,7 @@ uint Image_DXTCalcSize( const char *name, dds_t *hdr, size_t filesize )
if( filesize != buffsize ) // main check
{
Con_DPrintf( S_WARN "Image_LoadDDS: (%s) probably corrupted (%i should be %i)\n", name, buffsize, filesize );
Con_DPrintf( S_WARN "Image_LoadDDS: (%s) probably corrupted (%i should be %lu)\n", name, buffsize, filesize );
if( buffsize > filesize )
return false;
}

2
engine/common/lib_common.c

@ -48,7 +48,7 @@ void *COM_FunctionFromName_SR( void *hInstance, const char *pName ) @@ -48,7 +48,7 @@ void *COM_FunctionFromName_SR( void *hInstance, const char *pName )
const char *COM_OffsetNameForFunction( void *function )
{
static string sname;
Q_snprintf( sname, MAX_STRING, "ofs:%d", (size_t)((byte*)function - (byte*)svgame.dllFuncs.pfnGameInit) );
Q_snprintf( sname, MAX_STRING, "ofs:%lu", (size_t)((byte*)function - (byte*)svgame.dllFuncs.pfnGameInit) );
Con_Reportf( "COM_OffsetNameForFunction %s\n", sname );
return sname;
}

12
engine/common/mod_bmodel.c

@ -308,7 +308,7 @@ static void Mod_LoadLump( const byte *in, mlumpinfo_t *info, mlumpstat_t *stat, @@ -308,7 +308,7 @@ static void Mod_LoadLump( const byte *in, mlumpinfo_t *info, mlumpstat_t *stat,
if( l->filelen % real_entrysize )
{
if( !FBitSet( flags, LUMP_SILENT ))
Con_DPrintf( S_ERROR "Mod_Load%s: Lump size %d was not a multiple of %u bytes\n", msg2, l->filelen, real_entrysize );
Con_DPrintf( S_ERROR "Mod_Load%s: Lump size %d was not a multiple of %lu bytes\n", msg2, l->filelen, real_entrysize );
loadstat.numerrors++;
return;
}
@ -1392,7 +1392,7 @@ static qboolean Mod_LoadColoredLighting( dbspmodel_t *bmod ) @@ -1392,7 +1392,7 @@ static qboolean Mod_LoadColoredLighting( dbspmodel_t *bmod )
if( litdatasize != ( bmod->lightdatasize * 3 ))
{
Con_Printf( S_ERROR "%s has mismatched size (%li should be %i)\n", path, litdatasize, bmod->lightdatasize * 3 );
Con_Printf( S_ERROR "%s has mismatched size (%li should be %lu)\n", path, litdatasize, bmod->lightdatasize * 3 );
Mem_Free( in );
return false;
}
@ -1447,7 +1447,7 @@ static void Mod_LoadDeluxemap( dbspmodel_t *bmod ) @@ -1447,7 +1447,7 @@ static void Mod_LoadDeluxemap( dbspmodel_t *bmod )
if( deluxdatasize != bmod->lightdatasize )
{
Con_Reportf( S_ERROR "%s has mismatched size (%li should be %i)\n", path, deluxdatasize, bmod->lightdatasize );
Con_Reportf( S_ERROR "%s has mismatched size (%li should be %lu)\n", path, deluxdatasize, bmod->lightdatasize );
Mem_Free( in );
return;
}
@ -2296,7 +2296,7 @@ static void Mod_LoadSurfaces( dbspmodel_t *bmod ) @@ -2296,7 +2296,7 @@ static void Mod_LoadSurfaces( dbspmodel_t *bmod )
if(( in->firstedge + in->numedges ) > loadmodel->numsurfedges )
{
Con_Reportf( S_ERROR "bad surface %i from %i\n", i, bmod->numsurfaces );
Con_Reportf( S_ERROR "bad surface %i from %lu\n", i, bmod->numsurfaces );
continue;
}
@ -2631,7 +2631,7 @@ static void Mod_LoadLightVecs( dbspmodel_t *bmod ) @@ -2631,7 +2631,7 @@ static void Mod_LoadLightVecs( dbspmodel_t *bmod )
if( bmod->deluxdatasize != bmod->lightdatasize )
{
if( bmod->deluxdatasize > 0 )
Con_Printf( S_ERROR "Mod_LoadLightVecs: has mismatched size (%i should be %i)\n", bmod->deluxdatasize, bmod->lightdatasize );
Con_Printf( S_ERROR "Mod_LoadLightVecs: has mismatched size (%lu should be %i)\n", bmod->deluxdatasize, bmod->lightdatasize );
else Mod_LoadDeluxemap( bmod ); // old method
return;
}
@ -2650,7 +2650,7 @@ static void Mod_LoadShadowmap( dbspmodel_t *bmod ) @@ -2650,7 +2650,7 @@ static void Mod_LoadShadowmap( dbspmodel_t *bmod )
if( bmod->shadowdatasize != ( bmod->lightdatasize / 3 ))
{
if( bmod->shadowdatasize > 0 )
Con_Printf( S_ERROR "Mod_LoadShadowmap: has mismatched size (%i should be %i)\n", bmod->shadowdatasize, bmod->lightdatasize / 3 );
Con_Printf( S_ERROR "Mod_LoadShadowmap: has mismatched size (%i should be %lu)\n", bmod->shadowdatasize, bmod->lightdatasize / 3 );
return;
}

Loading…
Cancel
Save