diff options
author | dequis <dx@dxzone.com.ar> | 2016-12-26 21:37:12 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-12-26 21:37:50 -0300 |
commit | c11b68a20061dcc262f0cf34ab863afbf3c7adb4 (patch) | |
tree | fa1ed959a3cfad94babad551a0751495d0ae875d | |
parent | faa7abb613e71133fa190725ace3df794ca3cc30 (diff) |
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.
-rw-r--r-- | protocols/purple/purple.c | 6 |
1 files 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); |