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:
parent
275d890e01
commit
1de6ab0d50
6 changed files with 8 additions and 8 deletions
neo
|
@ -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() ) {
|
||||
|
|
|
@ -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() ) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -273,7 +273,7 @@ bool idEFXFile::LoadFile( const char *filename, bool OSPath ) {
|
|||
}
|
||||
|
||||
if ( !src.ExpectTokenString( "Version" ) ) {
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( src.ParseInt() != 1 ) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue