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:
parent
a1e0e750d4
commit
c097563730
@ -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 {
|
||||
|
||||
@ -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 */ \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user