From 66229085bbd92dc75dc0bb9bc4d34c8438c48b1d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 25 Oct 2019 19:53:25 -0700 Subject: 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. --- lib.c | 2 +- lib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib.c b/lib.c index 4883f37d..be0622cb 100644 --- a/lib.c +++ b/lib.c @@ -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); diff --git a/lib.h b/lib.h index 19e55f65..27ae3a20 100644 --- a/lib.h +++ b/lib.h @@ -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; -- cgit v1.2.3