From 5d7e281aa6304acf7ea715c545c491aa607d504d Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Tue, 11 Aug 2020 15:29:57 -0700 Subject: [PATCH] Remove unused and incorrectly declared CIntToSmallp() function. Fix warning for "control may reach end of non-void function". modified: src/lisp2c.c --- src/lisp2c.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lisp2c.c b/src/lisp2c.c index 81bcb58..2361c58 100644 --- a/src/lisp2c.c +++ b/src/lisp2c.c @@ -81,6 +81,8 @@ int LispIntToCInt(LispPTR lispint) { char msg[200]; sprintf(msg, "Arg 0x%x isn't a lisp integer.", lispint); error(msg); + /* NOTREACHED */ + return(0); } break; } @@ -98,13 +100,3 @@ LispPTR CIntToLispInt(int cint) { return (S_NEGATIVE | (0xFFFF & cint)); } } - -DLword CIntToSmallp(int cint) { - if (abs(cint) > 0xFFFF) { /* its a fixp! */ - error("Arg not a Smallp.\n"); - } else if (cint >= 0) { /* its a positive smallp! */ - return (S_POSITIVE | cint); - } else { /* its a negative smallp! */ - return (S_NEGATIVE | (0xFFFF & cint)); - } -}