Got rid of some compilation warnings
This commit is contained in:
parent
f0496089e0
commit
068f844945
@ -86,6 +86,7 @@ int c99_scan(C99 * c99)
|
|||||||
int ret;
|
int ret;
|
||||||
char const * string;
|
char const * string;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
int c;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "DEBUG: %s()\n", __func__);
|
fprintf(stderr, "DEBUG: %s()\n", __func__);
|
||||||
@ -105,9 +106,10 @@ int c99_scan(C99 * c99)
|
|||||||
token_set_code(c99->token, _operators[i].code);
|
token_set_code(c99->token, _operators[i].code);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(isalpha(string[0]))
|
c = string[0];
|
||||||
|
if(isalpha(c))
|
||||||
token_set_code(c99->token, C99_CODE_IDENTIFIER);
|
token_set_code(c99->token, C99_CODE_IDENTIFIER);
|
||||||
else if(isdigit(string[0])) /* FIXME make a stricter check? */
|
else if(isdigit(c)) /* FIXME make a stricter check? */
|
||||||
token_set_code(c99->token, C99_CODE_CONSTANT);
|
token_set_code(c99->token, C99_CODE_CONSTANT);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user