Index = ConstExpression ();
/* Must be a valid index */
- if (Index >= strlen (Str)) {
+ if (Index >= (long) strlen (Str)) {
Error (ERR_RANGE);
return 0;
}
/* Page and other formatting */
int PageLength = -1; /* Length of a listing page */
static unsigned PageNumber = 1; /* Current listing page number */
-static unsigned PageLines = 0; /* Current line on page */
+static int PageLines = 0; /* Current line on page */
static unsigned ListBytes = 12; /* Number of bytes to list for one line */
/* Switch the listing on/off */
{ "--version", 0, OptVersion },
};
- int I;
+ unsigned I;
/* Initialize the cmdline module */
InitCmdLine (&argc, &argv, "ca65");
case 'o':
OutFile = GetArg (&I, 2);
- break;
+ break;
case 's':
OptSmart (Arg, 0);
# Library dir
COMMON = ../common
-CFLAGS = -g -O2 -Wall -I$(COMMON)
+CFLAGS = -g -O2 -Wall -Wsign-compare -I$(COMMON)
CC = gcc
EBIND = emxbind
LDFLAGS =
List = CollectTokens (0, 9999);
/* Delete tokens from the list until Count tokens are remaining */
- while (List->Count > Count) {
+ while (List->Count > (unsigned) Count) {
/* Get the first node */
TokNode* T = List->Root;
/* Read the number */
IVal = 0;
while (IsDigit (C)) {
- if (IVal > (0xFFFFFFFF / 10)) {
+ if (IVal > (long) (0xFFFFFFFFUL / 10)) {
Error (ERR_NUM_OVERFLOW);
IVal = 0;
}
SymEntry* S;
/* Check the parameters */
+#if (CD_TYPE_MIN != 0)
CHECK (Type >= CD_TYPE_MIN && Type <= CD_TYPE_MAX);
+#else
+ CHECK (Type <= CD_TYPE_MAX);
+#endif
CHECK (Prio >= CD_PRIO_MIN && Prio <= CD_PRIO_MAX);
/* Don't accept local symbols */