[Pkg-xmpp-devel] Bug#997162: mcabber: FTBFS: screen.c:1281:33: error: format not a string literal and no format arguments [-Werror=format-security]
Lucas Nussbaum
lucas at debian.org
Sat Oct 23 20:07:01 BST 2021
Source: mcabber
Version: 1.1.2-1
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o screen.o screen.c
> screen.c: In function ‘scr_update_window’:
> screen.c:1281:33: error: format not a string literal and no format arguments [-Werror=format-security]
> 1281 | wprintw(win_entry->win, pref);
> | ^~~~
> screen.c:1284:9: error: format not a string literal and no format arguments [-Werror=format-security]
> 1284 | wprintw(win_entry->win, pref+timelen);
> | ^~~~~~~
> screen.c:1286:33: error: format not a string literal and no format arguments [-Werror=format-security]
> 1286 | wprintw(win_entry->win, pref);
> | ^~~~
> screen.c:1365:33: error: format not a string literal and no format arguments [-Werror=format-security]
> 1365 | wprintw(win_entry->win, pref);
> | ^~~~
> screen.c: In function ‘scr_draw_main_window’:
> screen.c:1785:3: error: format not a string literal and no format arguments [-Werror=format-security]
> 1785 | mvwprintw(chatWnd, 0, 0, message);
> | ^~~~~~~~~
> screen.c: In function ‘scr_draw_roster’:
> screen.c:2260:13: warning: ‘g_pattern_match_string’ is deprecated: Use 'g_pattern_spec_match_string' instead [-Wdeprecated-declarations]
> 2260 | if (g_pattern_match_string(rc->compiled, bjid) &&
> | ^~
> In file included from /usr/include/glib-2.0/glib.h:65,
> from screen.h:4,
> from screen.c:50:
> /usr/include/glib-2.0/glib/gpattern.h:55:15: note: declared here
> 55 | gboolean g_pattern_match_string (GPatternSpec *pspec,
> | ^~~~~~~~~~~~~~~~~~~~~~
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o settings.o settings.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o hooks.o hooks.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o utf8.o utf8.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o histolog.o histolog.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o utils.o utils.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o pgp.o pgp.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o xmpp.o xmpp.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o xmpp_helper.o xmpp_helper.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o xmpp_iq.o xmpp_iq.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o xmpp_iqrequest.o xmpp_iqrequest.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o xmpp_muc.o xmpp_muc.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o xmpp_s10n.o xmpp_s10n.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o caps.o caps.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o help.o help.c
> In function ‘scr_process_vi_arrow_key’,
> inlined from ‘scr_process_key’ at screen.c:4538:7:
> screen.c:4466:20: warning: ‘mask’ may be used uninitialized [-Wmaybe-uninitialized]
> 4466 | size_t cmd_len = strlen(mask);
> | ^~~~~~~~~~~~
> In file included from screen.c:23:
> screen.c: In function ‘scr_process_key’:
> /usr/include/string.h:391:15: note: by argument 1 of type ‘const char *’ to ‘strlen’ declared here
> 391 | extern size_t strlen (const char *__s)
> | ^~~~~~
> screen.c:4465:8: note: ‘mask’ declared here
> 4465 | char mask[INPUTLINE_LENGTH+1];
> | ^~~~
> caps.c: In function ‘caps_copy_to_persistent’:
> caps.c:552:5: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
> 552 | write (fd, data, length);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o carbons.o carbons.c
> gcc -DHAVE_CONFIG_H -I. -I../include -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/loudmouth-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_GNU_SOURCE -c -o otr.o otr.c
> cc1: some warnings being treated as errors
> make[4]: *** [Makefile:583: screen.o] Error 1
The full build log is available from:
http://qa-logs.debian.net/2021/10/23/mcabber_1.1.2-1_unstable.log
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.
More information about the Pkg-xmpp-devel
mailing list