diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2024-04-10 00:11:57 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2024-04-10 00:11:57 -0700 |
commit | 7e9dd58f14939a1f5f4526f9b11d1a2605de76e8 (patch) | |
tree | fad7fa59607ef403a82ac7c133eaaeddcb4583d9 /src | |
parent | 3d6ba50682bb1384eb487789275f95c87930944c (diff) |
modules/rkt: add some missing casts
Some compilers seem to get upset about this in combination with
my use of -Werror -Wall
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/rkt/rkt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c index d10c046..7bca9ee 100644 --- a/src/modules/rkt/rkt.c +++ b/src/modules/rkt/rkt.c @@ -282,7 +282,7 @@ static int rkt_pipe_update(void *context, til_stream_pipe_t *pipe, const void *o rkt_pipe->var.i32 = RKT_CLAMP(round(val), INT32_MIN, INT32_MAX); break; case TIL_TAP_TYPE_I64: - rkt_pipe->var.i64 = RKT_CLAMP(round(val), INT64_MIN, INT64_MAX); + rkt_pipe->var.i64 = RKT_CLAMP((int64_t)round(val), INT64_MIN, INT64_MAX); break; case TIL_TAP_TYPE_U8: rkt_pipe->var.u8 = RKT_CLAMP(round(val), 0, UINT8_MAX); @@ -294,7 +294,7 @@ static int rkt_pipe_update(void *context, til_stream_pipe_t *pipe, const void *o rkt_pipe->var.u32 = RKT_CLAMP(round(val), 0, UINT32_MAX); break; case TIL_TAP_TYPE_U64: - rkt_pipe->var.u64 = RKT_CLAMP(round(val), 0, UINT64_MAX); + rkt_pipe->var.u64 = RKT_CLAMP((uint64_t)round(val), 0, UINT64_MAX); break; case TIL_TAP_TYPE_FLOAT: rkt_pipe->var.f = RKT_CLAMP(val, FLT_MIN, FLT_MAX); |