Fix some compiler warnings (wrong types, superfluous checks, printf-fuckup)

This commit is contained in:
Daniel Gibson 2015-09-27 18:05:04 +02:00
parent 5e13e6f36f
commit 34490bb875
3 changed files with 5 additions and 5 deletions

View file

@ -2653,7 +2653,7 @@ void idGameLocal::CalcFov( float base_fov, float &fov_x, float &fov_y ) const {
// FIXME: somehow, this is happening occasionally // FIXME: somehow, this is happening occasionally
assert( fov_y > 0 ); assert( fov_y > 0 );
if ( fov_y <= 0 ) { if ( fov_y <= 0 ) {
Error( "idGameLocal::CalcFov: bad result, fov_y == %f, base_fov == ", fov_y, base_fov ); Error( "idGameLocal::CalcFov: bad result, fov_y == %f, base_fov == %f", fov_y, base_fov );
} }
switch( r_aspectRatio.GetInteger() ) { switch( r_aspectRatio.GetInteger() ) {

View file

@ -2387,7 +2387,7 @@ void idGameLocal::CalcFov( float base_fov, float &fov_x, float &fov_y ) const {
// FIXME: somehow, this is happening occasionally // FIXME: somehow, this is happening occasionally
assert( fov_y > 0 ); assert( fov_y > 0 );
if ( fov_y <= 0 ) { if ( fov_y <= 0 ) {
Error( "idGameLocal::CalcFov: bad result, fov_y == %f, base_fov == ", fov_y, base_fov ); Error( "idGameLocal::CalcFov: bad result, fov_y == %f, base_fov == %f", fov_y, base_fov );
} }
switch( r_aspectRatio.GetInteger() ) { switch( r_aspectRatio.GetInteger() ) {

View file

@ -712,9 +712,9 @@ int idParser::ExpandBuiltinDefine( idToken *deftoken, define_t *define, idToken
curtime = ctime(&t); curtime = ctime(&t);
(*token) = "\""; (*token) = "\"";
token->Append( curtime+4 ); token->Append( curtime+4 );
token[7] = '\0'; token[7] = NULL;
token->Append( curtime+20 ); token->Append( curtime+20 );
token[10] = '\0'; token[10] = NULL;
token->Append( "\"" ); token->Append( "\"" );
free(curtime); free(curtime);
token->type = TT_STRING; token->type = TT_STRING;
@ -731,7 +731,7 @@ int idParser::ExpandBuiltinDefine( idToken *deftoken, define_t *define, idToken
curtime = ctime(&t); curtime = ctime(&t);
(*token) = "\""; (*token) = "\"";
token->Append( curtime+11 ); token->Append( curtime+11 );
token[8] = '\0'; token[8] = NULL;
token->Append( "\"" ); token->Append( "\"" );
free(curtime); free(curtime);
token->type = TT_STRING; token->type = TT_STRING;