At Wed, 27 Dec 2006 14:23:32 +0100 Troman wrote: >> It uses an postfix operator ++ on an enum while an enum's basetype (e.g. >> int) is undefined and therefore doesn't have such an operator. >> Attached a very simple patch to fix this one. > Actually unlike in C++ using postfix increment on enum is perfectly > legal in > C and it doesn't even go outside of the last value in this particular > implementation, so there shouldn't be problems. But if that breaks any > compiler we should of course get rid of that. ;-) Just found another one, after checking out a clean copy of the repo, which I apparently had already fixed in my working copy. It's src/droid.c this time.
Attached a patch to fix it. -- Giel
Index: src/droid.c =================================================================== --- src/droid.c (revision 571) +++ src/droid.c (working copy) @@ -4395,7 +4395,7 @@ { for (inc = 0; inc < NUM_WEAPON_CLASS; inc++) { - for (impact_side = 0;impact_side < NUM_HIT_SIDES;impact_side++) + for (impact_side = 0;impact_side < NUM_HIT_SIDES;impact_side=impact_side+1) { //psDroid->armour[inc] = (asBodyStats + pTemplate->asParts[COMP_BODY])->armourValue[inc]; psDroid->armour[impact_side][inc] = bodyArmour(asBodyStats + pTemplate-> @@ -4407,7 +4407,7 @@ { for (inc = 0; inc < NUM_WEAPON_CLASS; inc++) { - for (impact_side = 0;impact_side < NUM_HIT_SIDES;impact_side++) + for (impact_side = 0;impact_side < NUM_HIT_SIDES;impact_side=impact_side+1) { psDroid->armour[impact_side][inc] = bodyArmour(asBodyStats + pTemplate-> asParts[COMP_BODY], (UBYTE)player, DROID_BODY_UPGRADE, (WEAPON_CLASS)inc, impact_side); @@ -7104,7 +7104,7 @@ x = psD->x; y = psD->y; body = psD->body; - for (impact_side = 0;impact_side < NUM_HIT_SIDES;impact_side++) + for (impact_side = 0;impact_side < NUM_HIT_SIDES;impact_side=impact_side+1) { armourK[impact_side] = psD->armour[impact_side][WC_KINETIC]; armourH[impact_side] = psD->armour[impact_side][WC_HEAT]; @@ -7129,7 +7129,7 @@ { addDroid(psNewDroid, apsDroidLists); psNewDroid->body = body; - for (impact_side = 0;impact_side < NUM_HIT_SIDES;impact_side++) + for (impact_side = 0;impact_side < NUM_HIT_SIDES;impact_side=impact_side+1) { psNewDroid->armour[impact_side][WC_KINETIC] = armourK[impact_side]; psNewDroid->armour[impact_side][WC_HEAT] = armourH[impact_side];
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev