SA-MP Forums Archive
Preprocessor: redundant code - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Preprocessor: redundant code (/showthread.php?tid=282603)



Preprocessor: redundant code - KoczkaHUN - 11.09.2011

Somewhere in my include:
pawn Код:
#define TIME(%0) ((%0) ? TIMER_Times[2] - TIMER_Times[1] : TIMER_Times[1] - TIMER_Times[0])
Somewhere in my test FS:
pawn Код:
printf("%d %d", TIME(0), TIME(1));
Compiler outputs:
Quote:

...pwn(16) : warning 205: redundant code: constant expression is zero
...pwn(16) : warning 206: redundant test: constant expression is non-zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

what's the problem?