- Shut up GCC aggressive optimizer warnings.

From what I can see, GCC would miscompile the involved loops, because the index variable is 'signed int' and the multiplication with an unsigned would cause signed overflow (undefined behavior). Change the index variable type to 'unsigned int' to expect unsigned overflow (conformant to standard).
This commit is contained in:
Edoardo Prezioso 2014-05-25 10:11:09 +02:00
parent b285cbebe4
commit 72bbb19cc7
4 changed files with 4 additions and 4 deletions

View file

@ -187,7 +187,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_VolcanoBlast)
DEFINE_ACTION_FUNCTION(AActor, A_VolcBallImpact)
{
int i;
unsigned int i;
AActor *tiny;
angle_t angle;

View file

@ -797,7 +797,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireBlasterPL1)
DEFINE_ACTION_FUNCTION(AActor, A_SpawnRippers)
{
int i;
unsigned int i;
angle_t angle;
AActor *ripper;

View file

@ -171,7 +171,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WhirlwindSeek)
DEFINE_ACTION_FUNCTION(AActor, A_LichIceImpact)
{
int i;
unsigned int i;
angle_t angle;
AActor *shard;

View file

@ -125,7 +125,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_IceGuyDie)
DEFINE_ACTION_FUNCTION(AActor, A_IceGuyMissileExplode)
{
AActor *mo;
int i;
unsigned int i;
for (i = 0; i < 8; i++)
{