diff options
author | rbuj <[email protected]> | 2020-11-19 12:02:28 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-11-25 12:36:12 +0100 |
commit | ef246014604539f6ba36ae7c93d3bb15c7d35104 (patch) | |
tree | 0ae83051e4eb0a4b893fe18107d9b42e97e220e9 /src | |
parent | c37bfa84db83ebbe48fefdf3401c6ea4182cc9b0 (diff) | |
download | mate-calc-ef246014604539f6ba36ae7c93d3bb15c7d35104.tar.bz2 mate-calc-ef246014604539f6ba36ae7c93d3bb15c7d35104.tar.xz |
math-buttons: Remove warnings about format not a string literal
Diffstat (limited to 'src')
-rw-r--r-- | src/math-buttons.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/math-buttons.c b/src/math-buttons.c index f9e74f5..a28db23 100644 --- a/src/math-buttons.c +++ b/src/math-buttons.c @@ -902,17 +902,16 @@ shift_left_cb(GtkWidget *widget, MathButtons *buttons) for (i = 1; i < 16; i++) { GtkWidget *item, *label; - gchar *format, *text; + gchar *text; if (i < 10) { /* Left Shift Popup: Menu item to shift left by n places (n < 10) */ - format = ngettext("_%d place", "_%d places", i); + text = g_strdup_printf(ngettext("_%d place", "_%d places", i), i); } else { /* Left Shift Popup: Menu item to shift left by n places (n >= 10) */ - format = ngettext("%d place", "%d places", i); + text = g_strdup_printf(ngettext("%d place", "%d places", i), i); } - text = g_strdup_printf(format, i); label = gtk_label_new_with_mnemonic(text); item = gtk_menu_item_new(); @@ -945,17 +944,16 @@ shift_right_cb(GtkWidget *widget, MathButtons *buttons) for (i = 1; i < 16; i++) { GtkWidget *item, *label; - gchar *format, *text; + gchar *text; if (i < 10) { /* Right Shift Popup: Menu item to shift right by n places (n < 10) */ - format = ngettext("_%d place", "_%d places", i); + text = g_strdup_printf(ngettext("_%d place", "_%d places", i), i); } else { /* Right Shift Popup: Menu item to shift right by n places (n >= 10) */ - format = ngettext("%d place", "%d places", i); + text = g_strdup_printf(ngettext("%d place", "%d places", i), i); } - text = g_strdup_printf(format, i); label = gtk_label_new_with_mnemonic(text); item = gtk_menu_item_new(); |