After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765918 - nautilus-mime-actions.c:1146:10: error: format not a string literal and no format arguments [-Werror=format-security]
nautilus-mime-actions.c:1146:10: error: format not a string literal and no fo...
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-02 23:05 UTC by Michael Biebl
Modified: 2016-05-04 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mime-actions: use format argument (1005 bytes, patch)
2016-05-03 16:08 UTC, Ernestas Kulik
committed Details | Review

Description Michael Biebl 2016-05-02 23:05:35 UTC
Version: 3.20.1

The latest upstream release fails to build with Werror=format-security

make[3]: Entering directory '/home/michael/debian/build-area/nautilus-3.20.1/src'
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../libnautilus-private -I../libnautilus-private -I../libgd -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gail-3.0 -I/usr/include/gnome-desktop-3.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/gsettings-desktop-schemas -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gsettings-desktop-schemas  -I/usr/include/libexif -I/usr/include/exempi-2.0 -DDATADIR=\""/usr/share"\" -DLIBDIR=\""/usr/lib"\" -DNAUTILUS_DATADIR=\""/usr/share/nautilus"\" -DPREFIX=\""/usr"\" -DVERSION="\"3.20.1\""   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -c -o nautilus-mime-actions.o nautilus-mime-actions.c
nautilus-mime-actions.c: In function 'show_unhandled_type_error':
nautilus-mime-actions.c:1146:10: error: format not a string literal and no format arguments [-Werror=format-security]
          text);
          ^
cc1: some warnings being treated as errors
Makefile:985: recipe for target 'nautilus-mime-actions.o' failed
make[3]: *** [nautilus-mime-actions.o] Error 1
make[3]: Leaving directory '/home/michael/debian/build-area/nautilus-3.20.1/src'
Makefile:832: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/michael/debian/build-area/nautilus-3.20.1/src'
Makefile:528: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/michael/debian/build-area/nautilus-3.20.1'
Makefile:459: recipe for target 'all' failed
make: *** [all] Error 2
Comment 1 Ernestas Kulik 2016-05-03 16:08:06 UTC
Created attachment 327241 [details] [review]
mime-actions: use format argument

The call to gtk_message_dialog_format_secondary_text() in
show_unhandled_type_error() is missing a format argument, which causes
build failures with -Werror=format-security.

This commit adds the missing argument.
Comment 2 Ernestas Kulik 2016-05-03 16:09:35 UTC
(In reply to Michael Biebl from comment #0)
> The latest upstream release fails to build with Werror=format-security

I’m afraid this one is my fault, sorry!
Comment 3 Carlos Soriano 2016-05-04 10:56:47 UTC
Review of attachment 327241 [details] [review]:

whops...
Comment 4 Ernestas Kulik 2016-05-04 15:08:18 UTC
Attachment 327241 [details] pushed as ebdc957 - mime-actions: use format argument