Where did those warnings come from?
#1

Hello
I've made a stock that worked perfectly untill I made another stock (that has nothing to do with this one).
I get those warnings (which I have never seen before,btw) when I compile:
pawn Код:
(417) : warning 206: redundant test: constant expression is non-zero
(418) : warning 206: redundant test: constant expression is non-zero
(419) : warning 206: redundant test: constant expression is non-zero
(420) : warning 206: redundant test: constant expression is non-zero
(421) : warning 206: redundant test: constant expression is non-zero
(422) : warning 206: redundant test: constant expression is non-zero
(423) : warning 206: redundant test: constant expression is non-zero
(426) : warning 206: redundant test: constant expression is non-zero
(427) : warning 206: redundant test: constant expression is non-zero
(428) : warning 206: redundant test: constant expression is non-zero
(429) : warning 206: redundant test: constant expression is non-zero
(430) : warning 206: redundant test: constant expression is non-zero
For those lines:
pawn Код:
stock SetPlayerTeamFromClass(playerid,classid)
{
    if (classid == X,X,X) { gTeam[playerid] = TEAM_X; }
    else if (classid == Y,Y,Y,Y,Y,Y,Y,Y) { gTeam[playerid] = TEAM_Y; }
    else if (classid == Z,Z,Z) { gTeam[playerid] = TEAM_Z; }
    else if (classid == A,A,A,A,A,A,A,A) { gTeam[playerid] = TEAM_A; }
    else if (classid == B,B,B,B) { gTeam[playerid] = TEAM_B; }
    else if (classid == C,C) { gTeam[playerid] = TEAM_C; }
    else if (classid == D,D,D,D,D) { gTeam[playerid] = TEAM_D; }
    else if (classid == E) { gTeam[playerid] = TEAM_E; }
    else if (classid == F) { gTeam[playerid] = TEAM_F; }
    else if (classid == G,G,G,G,G,G,G) { gTeam[playerid] = TEAM_G; }
    else if (classid == H,H,H,H,H,H) { gTeam[playerid] = TEAM_H; }
    else if (classid == I,I,I) { gTeam[playerid] = TEAM_I; }
    else if (classid == J,J,J) { gTeam[playerid] = TEAM_J; }
    else if (classid == K,K,K) { gTeam[playerid] = TEAM_K; }
    return 1;
}
(I censured the classes and teams,sorry)
I get the warnings for all lines exept arguments E and F.
Please help me
Thanks
Reply


Messages In This Thread
Where did those warnings come from? - by nuriel8833 - 15.05.2011, 17:11
Re: Where did those warnings come from? - by cs_master - 15.05.2011, 17:18
Re: Where did those warnings come from? - by nuriel8833 - 15.05.2011, 17:28
Re: Where did those warnings come from? - by cs_master - 15.05.2011, 17:35
Re: Where did those warnings come from? - by Raimis_R - 15.05.2011, 17:35
Re: Where did those warnings come from? - by nuriel8833 - 15.05.2011, 17:39
Re: Where did those warnings come from? - by Raimis_R - 15.05.2011, 17:42
Re: Where did those warnings come from? - by nuriel8833 - 15.05.2011, 18:00
Respuesta: Where did those warnings come from? - by admantis - 15.05.2011, 18:01
Re: Where did those warnings come from? - by __ - 15.05.2011, 18:03

Forum Jump:


Users browsing this thread: 1 Guest(s)