From 8736a03e7929f02edd8574b577eb22a3e27b1109 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 15 Sep 2020 11:50:01 +0300 Subject: [PATCH] smd: fix strict-aliasing warning on gcc 4.4 --- lib/system/smd/smd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/system/smd/smd.c b/lib/system/smd/smd.c index 1ba0191d6..bb1da1524 100644 --- a/lib/system/smd/smd.c +++ b/lib/system/smd/smd.c @@ -172,7 +172,7 @@ lws_smd_msg_printf(struct lws_context *ctx, lws_smd_class_t _class, { lws_smd_msg_t *msg; va_list ap; - char *p; + void *p; int n; if (!(ctx->smd._class_filter & _class)) @@ -196,7 +196,7 @@ lws_smd_msg_printf(struct lws_context *ctx, lws_smd_class_t _class, sizeof(*msg)); msg->length = (uint16_t)n; va_start(ap, format); - vsnprintf(p, n + 2, format, ap); + vsnprintf((char*)p, n + 2, format, ap); va_end(ap); /* @@ -204,7 +204,7 @@ lws_smd_msg_printf(struct lws_context *ctx, lws_smd_class_t _class, */ if (lws_smd_msg_send(ctx, p)) { - lws_smd_msg_free((void **)&p); + lws_smd_msg_free(&p); return 1; }