Duke4.net Forums: Messed up compiler warnings - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Messed up compiler warnings

User is online   Danukem 

  • Duke Plus Developer

#1

I'm noticing lately that sometimes the compiler warnings are messed up. I think this has been happening with errors, too, but I don't have an example for those. Here's an example for a warning:

what it says in the log:
BOTCONTROL.CON: In state `turnwaitcode':
BOTCONTROL.CON:3528: warning: malformed `gettextureceiling' branch


The actual code:

state turnwaitcode
	ife botturnwait TURNWAIT // bot just entered a new sector
	{
		getangle tempang xcoord ycoord
		getincangle botang tempang botgoalang
		// don't wait to turn if it's a small amount
		ifg botang -512 ifl botang 512 set botturnwait 2
		else
		{
			set temp currwalldist
			shiftr temp 10
			ifl temp 2 set temp 2
			ifg temp TURNWAIT set temp TURNWAIT
			ifl forwscandist 2048 div temp 2
			set botturnwait temp
			// al botturnwait
		}
		ifl botturnwait 2 set botturnwait 2
	}
	ifg botturnwait 0 sub botturnwait 1

	ife facewall 0
ends


The problem is on the very last line of the state. It's a malformed line (a fragment which accidentally got left in), but it has nothing to do with gettextureceiling.

I can post other examples when I find them if that would be helpful.
0

User is online   Danukem 

  • Duke Plus Developer

#2

Here's another example


warnings:
Line 2499, gettextureceiling: Gv_GetSpecialVarX(): invalid sprite ID -1
Line 2500, gettextureceiling: Gv_GetSpecialVarX(): invalid sprite ID -1
Line 2501, gettextureceiling: Gv_GetSpecialVarX(): invalid sprite ID -1

lines of code:
ife sprite[temptarget].picnum GREENSLIME shiftl xydist 2 else
ife sprite[temptarget].picnum EGG shiftl xydist 2 else
ife sprite[temptarget].picnum DRONE shiftl xydist 1



temptarget was -1, so the warning was correct in that respect, but it had nothing to do with gettextureceiling
0

User is offline   Hendricks266 

  • Weaponized Autism

  #3

Fixed in r6485.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options