mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Cast to int before comparing with EOF (#745).
This commit is contained in:
parent
da53f46c93
commit
e93b71990c
1 changed files with 3 additions and 3 deletions
6
vm.c
6
vm.c
|
@ -2088,7 +2088,7 @@ sexp sexp_apply (sexp ctx, sexp proc, sexp args) {
|
|||
else
|
||||
#endif
|
||||
i = sexp_write_char(ctx, sexp_unbox_character(_ARG1), _ARG2);
|
||||
if (i == EOF) {
|
||||
if ((int)i == EOF) {
|
||||
if (!sexp_port_openp(_ARG2))
|
||||
sexp_raise("write-char: port is closed", _ARG2);
|
||||
else
|
||||
|
@ -2167,7 +2167,7 @@ sexp sexp_apply (sexp ctx, sexp proc, sexp args) {
|
|||
errno = 0;
|
||||
#endif
|
||||
i = sexp_read_char(ctx, _ARG1);
|
||||
if (i == EOF) {
|
||||
if ((int)i == EOF) {
|
||||
if (!sexp_port_openp(_ARG1)) {
|
||||
sexp_raise("read-char: port is closed", _ARG1);
|
||||
#if SEXP_USE_GREEN_THREADS
|
||||
|
@ -2203,7 +2203,7 @@ sexp sexp_apply (sexp ctx, sexp proc, sexp args) {
|
|||
errno = 0;
|
||||
#endif
|
||||
i = sexp_read_char(ctx, _ARG1);
|
||||
if (i == EOF) {
|
||||
if ((int)i == EOF) {
|
||||
if (!sexp_port_openp(_ARG1))
|
||||
sexp_raise("peek-char: port is closed", _ARG1);
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue