diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-16 14:12:59 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-11-17 22:18:39 -0800 |
commit | 2b44fb5002c3e498ba66b60d763c2ac3fef3283e (patch) | |
tree | 650e22b3d9ed77549de88a3859f85b21a3075fa0 /src/lisp/ao_lisp.h | |
parent | d68d89a2b8d2c1ebde355171f99e5205dbd0ea43 (diff) |
altos/lisp: Eliminate compiler warning about array bounds at -O3
Using ao_lisp_pool - 4 caused the compiler to whinge about computing
an address outside the bounds of the array. Sigh. Restructure the code
to do the adjustment-by-4 in the integer computations instead of the
pointer ones.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp.h')
-rw-r--r-- | src/lisp/ao_lisp.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/lisp/ao_lisp.h b/src/lisp/ao_lisp.h index ea8d98b5..25d13fa3 100644 --- a/src/lisp/ao_lisp.h +++ b/src/lisp/ao_lisp.h @@ -118,9 +118,6 @@ ao_lisp_is_const(ao_poly poly) { return poly & AO_LISP_CONST; } -#define AO_LISP_POOL_BASE (ao_lisp_pool - 4) -#define AO_LISP_CONST_BASE (ao_lisp_const - 4) - #define AO_LISP_IS_CONST(a) (ao_lisp_const <= ((uint8_t *) (a)) && ((uint8_t *) (a)) < ao_lisp_const + AO_LISP_POOL_CONST) #define AO_LISP_IS_POOL(a) (ao_lisp_pool <= ((uint8_t *) (a)) && ((uint8_t *) (a)) < ao_lisp_pool + AO_LISP_POOL) |