summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-09-05 17:42:44 +0200
committerVictor Kareh <[email protected]>2019-09-19 07:35:18 -0400
commit530440ff8aeeb8bf2cbc807824c74519353d8686 (patch)
tree9676c0047b9a90ddb525c8666434aa80eff65789
parentf14af86aa11acfdf6833fe0f8349f2ad47bb1f6d (diff)
downloadmarco-530440ff8aeeb8bf2cbc807824c74519353d8686.tar.bz2
marco-530440ff8aeeb8bf2cbc807824c74519353d8686.tar.xz
Remove warning: format not a string literal, argument types not checked
ui/tabpopup.c:176:7: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] 176 | tmp = g_markup_printf_escaped (formatter, str); | ^~~
-rw-r--r--src/ui/tabpopup.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/ui/tabpopup.c b/src/ui/tabpopup.c
index 18ee83d5..0f6e129a 100644
--- a/src/ui/tabpopup.c
+++ b/src/ui/tabpopup.c
@@ -164,16 +164,10 @@ tab_entry_new (const MetaTabEntry *entry,
{
gchar *str;
gchar *tmp;
- gchar *formatter = "%s";
str = meta_g_utf8_strndup (entry->title, 4096);
- if (entry->hidden)
- {
- formatter = "[%s]";
- }
-
- tmp = g_markup_printf_escaped (formatter, str);
+ tmp = g_markup_printf_escaped (entry->hidden ? "[%s]" : "%s", str);
g_free (str);
str = tmp;