1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 15:36:34 +00:00

The error() function may return under exceptional circumstances (#97)

There are a few places where error() was called that in practice would never
be returned from, however since it was coded with the possibility of returning
all call sites must be consistent with that.

	modified:   ../src/car-cdr.c
	modified:   ../src/gchtfind.c
	modified:   ../src/hardrtn.c
This commit is contained in:
Nick Briggs 2021-01-02 13:36:14 -08:00 committed by GitHub
parent a1e0e750d4
commit c097563730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -78,6 +78,7 @@ LispPTR car(register LispPTR datum)
return (NIL);
else
error("car : ARG not list");
return (NIL); /* NOT REACHED */
}
} /* end of car */
@ -150,6 +151,7 @@ LispPTR rplaca(register LispPTR x, register LispPTR y)
return (NIL_PTR);
} else
error("ARG not List");
return (NIL_PTR); /* NOT REACHED */
}
else {

View File

@ -94,6 +94,7 @@
IncAllocCnt(1); \
return ptr; /* new 0 entry */ \
default: error("GC error: new entry touches stack bit"); \
return NIL; /* NOT REACHED */ \
} \
}
@ -114,6 +115,7 @@
GETGC(entry) = hiptr | (1 << HTCNTSHIFT) | HTSTKMASK; \
return NIL; \
default: error("GC error: new entry when turning off stack bit"); \
return NIL; /* NOT REACHED */ \
} \
}

View File

@ -250,7 +250,8 @@ retry: /* this is retry entry after MAKE_FXCOPY etc */
else
error("Shouldn't");
}
error("Control reached end of slowreturn()!");
return (NIL); /* NOT REACHED */
} /* slowreturn end */
#define MAXSAFEUSECOUNT 200