From 80a3ee5d5a3cdcf78837d52524d9aaa0fa319fc7 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 27 Oct 2014 16:53:57 +0000 Subject: [PATCH] Avoid log message warning messages due to incorrect int format The G_N_ELEMENTS() type is size_t but this was being passed to a format string with '%lu' which is of a different size on many platforms. Just delete this part of the warning message since it was not hugely useful. --- src/virt-viewer-app.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c index f53f450..262d75e 100644 --- a/src/virt-viewer-app.c +++ b/src/virt-viewer-app.c @@ -355,7 +355,9 @@ virt_viewer_app_parse_monitor_mappings(gchar **mappings, gsize nmappings) tokens = g_strsplit(mappings[i], ":", 2); if (g_strv_length(tokens) != 2) { - g_warning("Invalid monitor-mapping configuration: '%s'. Expected format is ':'. Got %lu elements", mappings[i], G_N_ELEMENTS(tokens)); + g_warning("Invalid monitor-mapping configuration: '%s'. " + "Expected format is ':'", + mappings[i]); g_strfreev(tokens); goto configerror; }