From: Chris Hanson Date: Sat, 27 Oct 2018 22:40:58 +0000 (-0700) Subject: Fix a couple of compiler warnings from 32-bit system. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~138^2~2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c11409f9c6082c6cc14da07342c3fbdebd18e7b4;p=mit-scheme.git Fix a couple of compiler warnings from 32-bit system. --- diff --git a/src/microcode/confshared.h b/src/microcode/confshared.h index 21af5397b..8741ebaa3 100644 --- a/src/microcode/confshared.h +++ b/src/microcode/confshared.h @@ -128,7 +128,7 @@ USA. #ifndef OFF_T_MAX # if SIZEOF_OFF_T < SIZEOF_INTMAX_T -# define OFF_T_MAX (~ ((~ ((intmax_t) 0)) << (CHAR_BIT * SIZEOF_OFF_T))) +# define OFF_T_MAX ((((intmax_t) 1) << (CHAR_BIT * SIZEOF_OFF_T)) - 1) # else # define OFF_T_MAX INTMAX_MAX # endif @@ -136,7 +136,7 @@ USA. #ifndef TIME_T_MAX # if SIZEOF_TIME_T < SIZEOF_INTMAX_T -# define TIME_T_MAX (~ ((~ ((intmax_t) 0)) << (CHAR_BIT * SIZEOF_TIME_T))) +# define TIME_T_MAX ((((intmax_t) 1) << (CHAR_BIT * SIZEOF_TIME_T)) - 1) # else # define TIME_T_MAX INTMAX_MAX # endif diff --git a/src/microcode/lookup.c b/src/microcode/lookup.c index d4f2b6448..af17f9059 100644 --- a/src/microcode/lookup.c +++ b/src/microcode/lookup.c @@ -1205,7 +1205,11 @@ find_binding_cell (SCHEME_OBJECT environment, SCHEME_OBJECT symbol, SCHEME_OBJECT * frame_ret) { if (NULL_FRAME_P (environment)) - return (0); + { + if (frame_ret != 0) + (*frame_ret) = environment; + return (0); + } assert (ENVIRONMENT_P (environment)); SCHEME_OBJECT frame = environment; while (1)