This project is archived and is in readonly mode.
typecast_array.c tests size_t against <0
-
Federico Di Gregorio
- State changed from new to open
The warning is correct but using <= instead of < would break array parsing. That test is a guard to avoid the (impossible?) case of receiving more ASCAN_END than ASCAN_BEGIN from the tokenizer. IMO, that guard can be removed.
-
Federico Di Gregorio
- State changed from open to resolved
- Assigned user set to Federico Di Gregorio
This is better:
if (stack_index == 0) return -1; array = stack[--stack_index];and should fix the warning.