comparison mcabber/mcabber/screen.c @ 2363:64f1899ff168

Fix format-security warnings This patch should fix the FTBFS report in Debian sid (bug 997162): the format string was omitted when displaying the message prefix and the mcabber version.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 24 Oct 2021 21:20:36 +0200
parents 1579ed96d501
children ca442ece1f70
comparison
equal deleted inserted replaced
2362:64de2d6858b0 2363:64f1899ff168
1276 char tmp; 1276 char tmp;
1277 1277
1278 tmp = pref[timelen]; 1278 tmp = pref[timelen];
1279 pref[timelen] = '\0'; 1279 pref[timelen] = '\0';
1280 wbkgdset(win_entry->win, get_color(COLOR_TIMESTAMP)); 1280 wbkgdset(win_entry->win, get_color(COLOR_TIMESTAMP));
1281 wprintw(win_entry->win, pref); 1281 wprintw(win_entry->win, "%s", pref);
1282 pref[timelen] = tmp; 1282 pref[timelen] = tmp;
1283 wbkgdset(win_entry->win, get_color(color)); 1283 wbkgdset(win_entry->win, get_color(color));
1284 wprintw(win_entry->win, pref+timelen); 1284 wprintw(win_entry->win, "%s", pref+timelen);
1285 } else 1285 } else
1286 wprintw(win_entry->win, pref); 1286 wprintw(win_entry->win, "%s", pref);
1287 1287
1288 // Make sure we are at the right position 1288 // Make sure we are at the right position
1289 wmove(win_entry->win, winy, prefixwidth-1); 1289 wmove(win_entry->win, winy, prefixwidth-1);
1290 1290
1291 // The MUC nick - overwrite with proper color 1291 // The MUC nick - overwrite with proper color
1360 // Display the mark 1360 // Display the mark
1361 winy = n + mark_offset; 1361 winy = n + mark_offset;
1362 wmove(win_entry->win, winy, 0); 1362 wmove(win_entry->win, winy, 0);
1363 wbkgdset(win_entry->win, get_color(COLOR_READMARK)); 1363 wbkgdset(win_entry->win, get_color(COLOR_READMARK));
1364 g_snprintf(pref, prefixwidth, " == "); 1364 g_snprintf(pref, prefixwidth, " == ");
1365 wprintw(win_entry->win, pref); 1365 wprintw(win_entry->win, "%s", pref);
1366 w = scr_gettextwidth() / 3; 1366 w = scr_gettextwidth() / 3;
1367 for (i=0; i<w; i++) 1367 for (i=0; i<w; i++)
1368 wprintw(win_entry->win, "== "); 1368 wprintw(win_entry->win, "== ");
1369 wclrtoeol(win_entry->win); 1369 wclrtoeol(win_entry->win);
1370 wbkgdset(win_entry->win, get_color(COLOR_GENERAL)); 1370 wbkgdset(win_entry->win, get_color(COLOR_GENERAL));
1780 1780
1781 /* Draw/init windows */ 1781 /* Draw/init windows */
1782 1782
1783 ver = mcabber_version(); 1783 ver = mcabber_version();
1784 message = g_strdup_printf("MCabber version %s.\n", ver); 1784 message = g_strdup_printf("MCabber version %s.\n", ver);
1785 mvwprintw(chatWnd, 0, 0, message); 1785 mvwprintw(chatWnd, 0, 0, "%s", message);
1786 mvwprintw(chatWnd, 1, 0, "http://mcabber.com/"); 1786 mvwprintw(chatWnd, 1, 0, "http://mcabber.com/");
1787 g_free(ver); 1787 g_free(ver);
1788 g_free(message); 1788 g_free(message);
1789 1789
1790 // Auto-scrolling in log window 1790 // Auto-scrolling in log window