1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-03 06:29:36 +00:00

Fixed a few warnings

git-svn-id: svn://svn.cc65.org/cc65/trunk@936 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2001-09-15 12:13:33 +00:00
parent 0b5c5e2e36
commit 8f057fd84d
5 changed files with 10 additions and 10 deletions

View File

@ -673,7 +673,7 @@ unsigned OptDuplicateLoads (CodeSeg* S)
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;
@ -683,7 +683,7 @@ unsigned OptDuplicateLoads (CodeSeg* S)
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;
@ -693,7 +693,7 @@ unsigned OptDuplicateLoads (CodeSeg* S)
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;
@ -900,11 +900,11 @@ unsigned OptTransfers (CodeSeg* S)
goto NextEntry;
}
}
/* Remove both transfers */
CS_DelEntry (S, I+1);
CS_DelEntry (S, I);
/* Remember, we had changes */
++Changes;
}

View File

@ -411,7 +411,7 @@ static int kcalc (int tok, long val1, long val2)
static GenDesc* FindGen (int Tok, GenDesc** Table)
static GenDesc* FindGen (token_t Tok, GenDesc** Table)
{
GenDesc* G;
while ((G = *Table) != 0) {

View File

@ -92,7 +92,7 @@ void SetItem (ExprNode* N, void* Item, unsigned Index)
{
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 */

View File

@ -14,7 +14,7 @@ COMMON = ../common
# 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=

View File

@ -314,7 +314,7 @@ static void ExpandMacroArgs (Macro* M)
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;
@ -355,7 +355,7 @@ static int MacroCall (Macro* M)
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;