Fix more warnings

This commit is contained in:
twinaphex 2015-04-28 07:00:17 +02:00
parent a87ae2b5be
commit 615741bf65
4 changed files with 13 additions and 5 deletions

View File

@ -117,7 +117,7 @@ void PM_Startup(void)
{
uint32_t size;
if(i >= PMSpriteStart && i < PMSoundStart || i == ChunksInFile - 1)
if(((i >= PMSpriteStart) && (i < PMSoundStart)) || (i == ChunksInFile - 1))
{
size_t offs = ptr - (uint8_t *) PMPageData;

View File

@ -503,7 +503,7 @@ US_LineInput(int x,int y,char *buf,const char *def,boolean escok,
curtime = GetTimeCount();
// After each direction change accept the next change after 250 ms and then everz 125 ms
if(ci.dir != lastdir || curtime - lastdirtime > TickBase / 4 && curtime - lastdirmovetime > TickBase / 8)
if(ci.dir != lastdir || ((curtime - lastdirtime > TickBase / 4) && (curtime - lastdirmovetime > TickBase / 8)))
{
if(ci.dir != lastdir)
{
@ -531,7 +531,8 @@ US_LineInput(int x,int y,char *buf,const char *def,boolean escok,
if(!s[cursor])
{
USL_MeasureString(s,&w,&h);
if(len >= maxchars || maxwidth && w >= maxwidth) break;
if(len >= maxchars || (maxwidth && w >= maxwidth))
break;
s[cursor] = ' ';
s[cursor + 1] = 0;
@ -545,7 +546,8 @@ US_LineInput(int x,int y,char *buf,const char *def,boolean escok,
if(!s[cursor])
{
USL_MeasureString(s,&w,&h);
if(len >= maxchars || maxwidth && w >= maxwidth) break;
if(len >= maxchars || (maxwidth && w >= maxwidth))
break;
s[cursor + 1] = 0;
}
s[cursor] = USL_RotateChar(s[cursor], 1);
@ -557,7 +559,8 @@ US_LineInput(int x,int y,char *buf,const char *def,boolean escok,
if(!s[cursor])
{
USL_MeasureString(s,&w,&h);
if(len >= maxchars || maxwidth && w >= maxwidth) break;
if(len >= maxchars || (maxwidth && w >= maxwidth))
break;
s[cursor + 1] = 0;
}
s[cursor] = USL_RotateChar(s[cursor], -1);

View File

@ -159,6 +159,9 @@ void ControlMovement (objtype *ob)
oldx = player->x;
oldy = player->y;
(void)oldx;
(void)oldy;
if(buttonstate[bt_strafeleft])
{
angle = ob->angle + ANGLES/4;

View File

@ -1044,6 +1044,8 @@ void DamageActor (objtype *ob, unsigned damage)
else
NewState (ob,&s_sspain1);
break;
default:
break;
}
}