From c11b68a20061dcc262f0cf34ab863afbf3c7adb4 Mon Sep 17 00:00:00 2001 From: dequis Date: Mon, 26 Dec 2016 21:37:12 -0300 Subject: purple: fix -Werror=format-string in chat settings code This one was caught by the debian build scripts in travis. I had format-security in my local cflags, not format-string. Welp. --- protocols/purple/purple.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index 20166599..4333d903 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -818,9 +818,7 @@ struct groupchat *purple_chat_join(struct im_connection *ic, const char *room, c if (pce->required && !g_hash_table_lookup(chat_hash, pce->identifier)) { if (!missing_settings) { - missing_settings = g_string_new(NULL); - g_string_printf(missing_settings, - "Can't join %s. The following settings are required: ", room); + missing_settings = g_string_sized_new(32); } g_string_append_printf(missing_settings, "%s, ", pce->identifier); } @@ -834,7 +832,7 @@ struct groupchat *purple_chat_join(struct im_connection *ic, const char *room, c /* remove the ", " from the end */ g_string_truncate(missing_settings, missing_settings->len - 2); - imcb_error(ic, missing_settings->str); + imcb_error(ic, "Can't join %s. The following settings are required: %s", room, missing_settings->str); g_string_free(missing_settings, TRUE); g_hash_table_destroy(chat_hash); -- cgit v1.2.3