diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-10-25 19:53:25 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-10-25 19:53:25 -0700 |
commit | 66229085bbd92dc75dc0bb9bc4d34c8438c48b1d (patch) | |
tree | 41316891d7cdc7c59683d87fd6fc420bf3745a7c | |
parent | 118dc224ef5f1481dddfb96a98b84d9a97bd91e6 (diff) | |
download | txr-66229085bbd92dc75dc0bb9bc4d34c8438c48b1d.tar.gz txr-66229085bbd92dc75dc0bb9bc4d34c8438c48b1d.tar.bz2 txr-66229085bbd92dc75dc0bb9bc4d34c8438c48b1d.zip |
fixparam: signed/unsigned warning from GNU C++.
* lib.h (FIXPARAM_MAX): Switch constant to signed type.
* lib.c (func_vm): Use num instead of unum on FIXPARAM_MAX,
since we are making it signed.
-rw-r--r-- | lib.c | 2 | ||||
-rw-r--r-- | lib.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -6144,7 +6144,7 @@ val func_vm(val closure, val desc, int fixparam, int reqargs, int variadic) { if (fixparam > FIXPARAM_MAX) { uw_throwf(error_s, lit("closure in ~s with more than ~s fixed parameters"), - desc, unum(FIXPARAM_MAX), nao); + desc, num(FIXPARAM_MAX), nao); } else if (fixparam < 0 || reqargs < 0 || reqargs > fixparam) { uw_throwf(error_s, lit("closure in ~s with bogus parameters"), desc, nao); @@ -148,7 +148,7 @@ struct package { typedef struct args *varg; #define FIXPARAM_BITS 7 -#define FIXPARAM_MAX ((1U << FIXPARAM_BITS) - 1) +#define FIXPARAM_MAX ((1 << FIXPARAM_BITS) - 1) struct func { obj_common; |