Definition warnings.
#1

This is my definition that I created today.

pawn Код:
#define GetTireSize(%0,%1) (%1 > 1) ? (reartiresize[%0 - 400]) : (fronttiresize[%0 - 400])
It doesn't matter how and where I use it, i'm getting those warnings:

Quote:

C:\Users\Kristo\Dropbox\Server (2)\IMPO\Server\gamemodes\imperial.pwn(14486) : warning 206: redundant test: constant expression is non-zero
C:\Users\Kristo\Dropbox\Server (2)\IMPO\Server\gamemodes\imperial.pwn(14487) : warning 205: redundant code: constant expression is zero

I know what they mean but I have no idea, how to fix it as everything seems legit.
Reply
#2

asdf
Reply
#3

Where a conditional expression was expected, a constant expression with a non-zero value was found, e.g. if (1). The test is redundant, because the conditional code is always executed. To create an endless loop, use for ( ;; ) instead of while (1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)