From 8945b49e616750983e2e99ef7be0a150cf663a6d Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Thu, 2 May 2019 12:01:19 +0100 Subject: [PATCH] Fix CI errors --- vnc/vnc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vnc/vnc.c b/vnc/vnc.c index b1e3aaa1..52e6a5b9 100644 --- a/vnc/vnc.c +++ b/vnc/vnc.c @@ -287,7 +287,7 @@ log_debug_screen_layout(const char *source, source, layout->count); i = 0; - while (res > 0 && res < sizeof(text) - pos && i < layout->count) + while (res > 0 && (size_t)res < sizeof(text) - pos && i < layout->count) { pos += res; res = g_snprintf(&text[pos], sizeof(text) - pos, @@ -297,7 +297,7 @@ log_debug_screen_layout(const char *source, layout->s[i].x, layout->s[i].y); ++i; } - log_message(LOG_LEVEL_DEBUG, text); + log_message(LOG_LEVEL_DEBUG, "%s", text); } /***************************************************************************** @@ -1840,8 +1840,6 @@ lib_mod_end(struct vnc *v) int lib_mod_set_param(struct vnc *v, const char *name, const char *value) { - unsigned int i; - if (g_strcasecmp(name, "username") == 0) { g_strncpy(v->username, value, 255); @@ -1903,6 +1901,7 @@ lib_mod_set_param(struct vnc *v, const char *name, const char *value) } else { + int i; v->screen_layout.count = client_info->monitorCount; v->screen_layout.s = g_new(struct vnc_screen, v->screen_layout.count);