mirror of
https://github.com/cc65/cc65.git
synced 2024-10-04 18:57:06 +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:
parent
0b5c5e2e36
commit
8f057fd84d
@ -673,7 +673,7 @@ unsigned OptDuplicateLoads (CodeSeg* S)
|
|||||||
case OP65_LDA:
|
case OP65_LDA:
|
||||||
if (E->RI->In.RegA >= 0 && /* Value of A is known */
|
if (E->RI->In.RegA >= 0 && /* Value of A is known */
|
||||||
CE_KnownImm (E) && /* Value to be loaded 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 = CS_GetNextEntry (S, I)) != 0 && /* There is a next entry */
|
||||||
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
|
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
|
||||||
Delete = 1;
|
Delete = 1;
|
||||||
@ -683,7 +683,7 @@ unsigned OptDuplicateLoads (CodeSeg* S)
|
|||||||
case OP65_LDX:
|
case OP65_LDX:
|
||||||
if (E->RI->In.RegX >= 0 && /* Value of X is known */
|
if (E->RI->In.RegX >= 0 && /* Value of X is known */
|
||||||
CE_KnownImm (E) && /* Value to be loaded 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 = CS_GetNextEntry (S, I)) != 0 && /* There is a next entry */
|
||||||
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
|
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
|
||||||
Delete = 1;
|
Delete = 1;
|
||||||
@ -693,7 +693,7 @@ unsigned OptDuplicateLoads (CodeSeg* S)
|
|||||||
case OP65_LDY:
|
case OP65_LDY:
|
||||||
if (E->RI->In.RegY >= 0 && /* Value of Y is known */
|
if (E->RI->In.RegY >= 0 && /* Value of Y is known */
|
||||||
CE_KnownImm (E) && /* Value to be loaded 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 = CS_GetNextEntry (S, I)) != 0 && /* There is a next entry */
|
||||||
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
|
(N->Info & OF_FBRA) == 0) { /* Which is not a cond branch */
|
||||||
Delete = 1;
|
Delete = 1;
|
||||||
|
@ -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;
|
GenDesc* G;
|
||||||
while ((G = *Table) != 0) {
|
while ((G = *Table) != 0) {
|
||||||
|
@ -92,7 +92,7 @@ void SetItem (ExprNode* N, void* Item, unsigned Index)
|
|||||||
{
|
{
|
||||||
if (Index >= CollCount (&N->List)) {
|
if (Index >= CollCount (&N->List)) {
|
||||||
/* Fill up with NULL pointers */
|
/* Fill up with NULL pointers */
|
||||||
while (Index >= CollCount (&N->List) < Index) {
|
while (Index >= CollCount (&N->List)) {
|
||||||
CollAppend (&N->List, 0);
|
CollAppend (&N->List, 0);
|
||||||
}
|
}
|
||||||
/* Append the new item */
|
/* Append the new item */
|
||||||
|
@ -14,7 +14,7 @@ COMMON = ../common
|
|||||||
|
|
||||||
# Default for the compiler lib search path as compiler define
|
# Default for the compiler lib search path as compiler define
|
||||||
CDEFS=-DCC65_INC=\"/usr/lib/cc65/include/\"
|
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
|
CC=gcc
|
||||||
EBIND=emxbind
|
EBIND=emxbind
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
@ -314,7 +314,7 @@ static void ExpandMacroArgs (Macro* M)
|
|||||||
static int MacroCall (Macro* M)
|
static int MacroCall (Macro* M)
|
||||||
/* Process a function like macro */
|
/* Process a function like macro */
|
||||||
{
|
{
|
||||||
unsigned ArgCount; /* Macro argument count */
|
int ArgCount; /* Macro argument count */
|
||||||
unsigned ParCount; /* Number of open parenthesis */
|
unsigned ParCount; /* Number of open parenthesis */
|
||||||
char Buf[LINESIZE]; /* Argument buffer */
|
char Buf[LINESIZE]; /* Argument buffer */
|
||||||
const char* ArgStart;
|
const char* ArgStart;
|
||||||
@ -355,7 +355,7 @@ static int MacroCall (Macro* M)
|
|||||||
if (ArgCount < M->ArgCount) {
|
if (ArgCount < M->ArgCount) {
|
||||||
M->ActualArgs[ArgCount++] = ArgStart;
|
M->ActualArgs[ArgCount++] = ArgStart;
|
||||||
} else if (CurC != ')' || *ArgStart != '\0' || M->ArgCount > 0) {
|
} 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.
|
* macro that does not have arguments.
|
||||||
*/
|
*/
|
||||||
++ArgCount;
|
++ArgCount;
|
||||||
|
Loading…
Reference in New Issue
Block a user