case OP65_LDA:
if (E->RI->In.RegA >= 0 && /* Value of A is known */
CE_KnownImm (E) && /* Value to be loaded is known */
- E->RI->In.RegA == E->Num && /* Both are equal */
+ E->RI->In.RegA == (long) E->Num && /* Both are equal */
(N = CS_GetNextEntry (S, I)) != 0 && /* There is a next entry */
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
Delete = 1;
case OP65_LDX:
if (E->RI->In.RegX >= 0 && /* Value of X is known */
CE_KnownImm (E) && /* Value to be loaded is known */
- E->RI->In.RegX == E->Num && /* Both are equal */
+ E->RI->In.RegX == (long) E->Num && /* Both are equal */
(N = CS_GetNextEntry (S, I)) != 0 && /* There is a next entry */
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
Delete = 1;
case OP65_LDY:
if (E->RI->In.RegY >= 0 && /* Value of Y is known */
CE_KnownImm (E) && /* Value to be loaded is known */
- E->RI->In.RegY == E->Num && /* Both are equal */
+ E->RI->In.RegY == (long) E->Num && /* Both are equal */
(N = CS_GetNextEntry (S, I)) != 0 && /* There is a next entry */
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
Delete = 1;
goto NextEntry;
}
}
-
+
/* Remove both transfers */
CS_DelEntry (S, I+1);
CS_DelEntry (S, I);
-
+
/* Remember, we had changes */
++Changes;
}
-static GenDesc* FindGen (int Tok, GenDesc** Table)
+static GenDesc* FindGen (token_t Tok, GenDesc** Table)
{
GenDesc* G;
while ((G = *Table) != 0) {
{
if (Index >= CollCount (&N->List)) {
/* Fill up with NULL pointers */
- while (Index >= CollCount (&N->List) < Index) {
+ while (Index >= CollCount (&N->List)) {
CollAppend (&N->List, 0);
}
/* Append the new item */
# Default for the compiler lib search path as compiler define
CDEFS=-DCC65_INC=\"/usr/lib/cc65/include/\"
-CFLAGS = -O2 -g -Wall -I$(COMMON) $(CDEFS)
+CFLAGS = -O2 -g -Wall -W -Wno-unused-parameter -I$(COMMON) $(CDEFS)
CC=gcc
EBIND=emxbind
LDFLAGS=
static int MacroCall (Macro* M)
/* Process a function like macro */
{
- unsigned ArgCount; /* Macro argument count */
+ int ArgCount; /* Macro argument count */
unsigned ParCount; /* Number of open parenthesis */
char Buf[LINESIZE]; /* Argument buffer */
const char* ArgStart;
if (ArgCount < M->ArgCount) {
M->ActualArgs[ArgCount++] = ArgStart;
} else if (CurC != ')' || *ArgStart != '\0' || M->ArgCount > 0) {
- /* Be sure not to count the single empty argument for a
+ /* Be sure not to count the single empty argument for a
* macro that does not have arguments.
*/
++ArgCount;