#3 Fails to build with -Werror=format-security

open
nobody
None
5
2012-02-27
2012-02-27
amoog
No

Hi there,

Ubuntu by default enables the so called hardening flags. Your game fails to build due to -Werror=format-security:

main.c:1738:11: warning: 'gdk_pixbuf_unref' is deprecated (declared at /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:243): Use 'g_object_unref' instead [-Wdeprecated-declarations]
main.c:1739:11: warning: 'gdk_pixbuf_unref' is deprecated (declared at /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:243): Use 'g_object_unref' instead [-Wdeprecated-declarations]
main.c:1740:11: warning: 'gdk_pixbuf_unref' is deprecated (declared at /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:243): Use 'g_object_unref' instead [-Wdeprecated-declarations]
main.c:1757:15: warning: 'gdk_pixbuf_unref' is deprecated (declared at /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:243): Use 'g_object_unref' instead [-Wdeprecated-declarations]
main.c: In function 'main':
main.c:2323:5: error: format not a string literal and no format arguments [-Werror=format-security]
main.c: At top level:
main.c:2145:1: warning: 'tray_popup_activate_action' defined but not used [-Wunused-function]
main.c: In function 'ui_record_score':
main.c:1932:12: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
main.c: In function 'ui_read_game_data':
main.c:1843:10: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
main.c:1844:10: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
cc1: some warnings being treated as errors

make[3]: *** [main.o] Error 1
make[3]: Leaving directory `/build/buildd/llk-linux-2.3~beta1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build/buildd/llk-linux-2.3~beta1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd/llk-linux-2.3~beta1'
make: *** [debian/stamp-makefile-build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

https://launchpad.net/ubuntu/+archive/test-rebuild-20120201/+build/3160669/+files/buildlog_ubuntu-precise-i386.llk-linux_2.3~beta1-0ubuntu4_FAILEDTOBUILD.txt.gz

Patch attached

Discussion

  • amoog
    amoog
    2012-02-27

     
    Attachments