0
0
Fork 0
mirror of https://github.com/dhewm/dhewm3.git synced 2025-03-24 11:31:59 +00:00

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 275d890e01
commit 1de6ab0d50
6 changed files with 8 additions and 8 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
assert( 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() ) {

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
assert( 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() ) {

View file

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

View file

@ -273,7 +273,7 @@ bool idEFXFile::LoadFile( const char *filename, bool OSPath ) {
}
if ( !src.ExpectTokenString( "Version" ) ) {
return NULL;
return false;
}
if ( src.ParseInt() != 1 ) {

View file

@ -528,7 +528,7 @@ sysEvent_t Sys_GetEvent() {
#if SDL_VERSION_ATLEAST(2, 0, 0)
case SDL_TEXTINPUT:
if (ev.text.text && *ev.text.text) {
if (ev.text.text[0]) {
if (!ev.text.text[1])
c = *ev.text.text;
else

View file

@ -2053,7 +2053,7 @@ bool idWindow::ParseRegEntry(const char *name, idParser *src) {
work = name;
work.ToLower();
idWinVar *var = GetWinVarByName(work, NULL);
idWinVar *var = GetWinVarByName(work, false);
if ( var ) {
for (int i = 0; i < NumRegisterVars; i++) {
if (idStr::Icmp(work, RegisterVars[i].name) == 0) {