mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- 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:
parent
b285cbebe4
commit
72bbb19cc7
4 changed files with 4 additions and 4 deletions
|
@ -187,7 +187,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_VolcanoBlast)
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_VolcBallImpact)
|
DEFINE_ACTION_FUNCTION(AActor, A_VolcBallImpact)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
AActor *tiny;
|
AActor *tiny;
|
||||||
angle_t angle;
|
angle_t angle;
|
||||||
|
|
||||||
|
|
|
@ -797,7 +797,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireBlasterPL1)
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_SpawnRippers)
|
DEFINE_ACTION_FUNCTION(AActor, A_SpawnRippers)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
angle_t angle;
|
angle_t angle;
|
||||||
AActor *ripper;
|
AActor *ripper;
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WhirlwindSeek)
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_LichIceImpact)
|
DEFINE_ACTION_FUNCTION(AActor, A_LichIceImpact)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
angle_t angle;
|
angle_t angle;
|
||||||
AActor *shard;
|
AActor *shard;
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_IceGuyDie)
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_IceGuyMissileExplode)
|
DEFINE_ACTION_FUNCTION(AActor, A_IceGuyMissileExplode)
|
||||||
{
|
{
|
||||||
AActor *mo;
|
AActor *mo;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue