From c11409f9c6082c6cc14da07342c3fbdebd18e7b4 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 27 Oct 2018 15:40:58 -0700 Subject: [PATCH] Fix a couple of compiler warnings from 32-bit system. --- src/microcode/confshared.h | 4 ++-- src/microcode/lookup.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) 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) -- 2.25.1