Hi all, Nothing serious, just a patch proposal to silent compiler warning about function parameter types.
Kind regards.
From 6ed9b28287440ca74e7a29016f9c4d081cd902d5 Mon Sep 17 00:00:00 2001 From: David Carlier <devne...@gmail.com> Date: Fri, 28 Jul 2017 14:42:42 +0100 Subject: [PATCH] CLEANUP: spoe: silencing compiler warning. Here we cast explicitally to silence gcc complains mismatches. --- src/flt_spoe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 5d574477..4df16ef6 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -706,7 +706,7 @@ spoe_handle_agenthello_frame(struct appctx *appctx, char *frame, size_t size) SPOE_APPCTX(appctx)->status_code = SPOE_FRM_ERR_INVALID; return 0; } - if (decode_varint(&p, end, &sz) == -1) { + if (decode_varint(&p, end, (uint64_t *)&sz) == -1) { SPOE_APPCTX(appctx)->status_code = SPOE_FRM_ERR_INVALID; return 0; } @@ -858,7 +858,7 @@ spoe_handle_agentdiscon_frame(struct appctx *appctx, char *frame, size_t size) SPOE_APPCTX(appctx)->status_code = SPOE_FRM_ERR_INVALID; return 0; } - if (decode_varint(&p, end, &sz) == -1) { + if (decode_varint(&p, end, (uint64_t *)&sz) == -1) { SPOE_APPCTX(appctx)->status_code = SPOE_FRM_ERR_INVALID; return 0; } @@ -2256,7 +2256,7 @@ spoe_decode_action_set_var(struct stream *s, struct spoe_context *ctx, default: goto skip; } - if (spoe_decode_buffer(&p, end, &str, &sz) == -1) + if (spoe_decode_buffer(&p, end, &str, (size_t *)&sz) == -1) goto skip; memset(&smp, 0, sizeof(smp)); smp_set_owner(&smp, s->be, s->sess, s, dir|SMP_OPT_FINAL); @@ -2306,7 +2306,7 @@ spoe_decode_action_unset_var(struct stream *s, struct spoe_context *ctx, default: goto skip; } - if (spoe_decode_buffer(&p, end, &str, &sz) == -1) + if (spoe_decode_buffer(&p, end, &str, (size_t *)&sz) == -1) goto skip; memset(&smp, 0, sizeof(smp)); smp_set_owner(&smp, s->be, s->sess, s, dir|SMP_OPT_FINAL); -- 2.12.2