diff --git a/src/cc65/assignment.c b/src/cc65/assignment.c index e6d1e4526..d565551ea 100644 --- a/src/cc65/assignment.c +++ b/src/cc65/assignment.c @@ -49,21 +49,6 @@ -/*****************************************************************************/ -/* Data */ -/*****************************************************************************/ - - - -/* Map a generator function and its attributes to a token */ -typedef struct GenDesc { - token_t Tok; /* Token to map to */ - unsigned Flags; /* Flags for generator function */ - void (*Func) (unsigned, unsigned long); /* Generator func */ -} GenDesc; - - - /*****************************************************************************/ /* Code */ /*****************************************************************************/ diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 0275e61a3..dc45b108d 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -48,13 +48,6 @@ -/* Map a generator function and its attributes to a token */ -typedef struct GenDesc { - token_t Tok; /* Token to map to */ - unsigned Flags; /* Flags for generator function */ - void (*Func) (unsigned, unsigned long); /* Generator func */ -} GenDesc; - /* Descriptors for the operations */ static GenDesc GenPASGN = { TOK_PLUS_ASSIGN, GEN_NOPUSH, g_add }; static GenDesc GenSASGN = { TOK_MINUS_ASSIGN, GEN_NOPUSH, g_sub }; @@ -243,7 +236,7 @@ static const GenDesc* FindGen (token_t Tok, const GenDesc* Table) /* Find a token in a generator table */ { while (Table->Tok != TOK_INVALID) { - if (Table->Tok == Tok) { + if ((token_t)Table->Tok == Tok) { return Table; } ++Table; diff --git a/src/cc65/expr.h b/src/cc65/expr.h index 841edcb62..abdf8ab0d 100644 --- a/src/cc65/expr.h +++ b/src/cc65/expr.h @@ -26,13 +26,20 @@ #define SQP_KEEP_NONE 0x00 #define SQP_KEEP_TEST 0x01U #define SQP_KEEP_EAX 0x02U -#define SQP_KEEP_EXPR 0x03U /* SQP_KEEP_TEST | SQP_KEEP_EAX */ +#define SQP_KEEP_EXPR 0x03U /* SQP_KEEP_TEST | SQP_KEEP_EAX */ /* Generator attributes */ #define GEN_NOPUSH 0x01 /* Don't push lhs */ #define GEN_COMM 0x02 /* Operator is commutative */ #define GEN_NOFUNC 0x04 /* Not allowed for function pointers */ +/* Map a generator function and its attributes to a token */ +typedef struct GenDesc { + long Tok; /* Token to map to */ + unsigned Flags; /* Flags for generator function */ + void (*Func) (unsigned, unsigned long); /* Generator func */ +} GenDesc; + /*****************************************************************************/ diff --git a/src/cc65/swstmt.c b/src/cc65/swstmt.c index ee0bd1a85..00555ffc3 100644 --- a/src/cc65/swstmt.c +++ b/src/cc65/swstmt.c @@ -206,7 +206,7 @@ void SwitchStatement (void) void CaseLabel (void) -/* Handle a case sabel */ +/* Handle a case label */ { ExprDesc CaseExpr; /* Case label expression */ long Val; /* Case label value */