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 746984 - build failure with -Werror=format-security
build failure with -Werror=format-security
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: general
git master
Other All
: Normal normal
: 0.3.0
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2015-03-29 21:22 UTC by darkxst
Modified: 2015-04-28 03:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: fix missing string format argument (869 bytes, patch)
2015-03-29 21:22 UTC, darkxst
none Details | Review
tests: fix missing string format argument (1.21 KB, patch)
2015-03-30 21:41 UTC, darkxst
none Details | Review

Description darkxst 2015-03-29 21:22:15 UTC
Builds with -Werror=format-security are failing due to a missing string argument in one of the test cases.

test-gegl-color.c: In function ‘assert_compare_rgba’:
test-gegl-color.c:50:9: error: format not a string literal and no format arguments [-Werror=format-security]
         g_error(str);
Comment 1 darkxst 2015-03-29 21:22:40 UTC
Created attachment 300549 [details] [review]
tests: fix missing string format argument

This causes a build failure when building with -Werror=format-security
Comment 2 Michael Natterer 2015-03-30 20:12:13 UTC
Why not pass all the stuff to g_error() directly, instead of building a
string and passing that to g_error(), using an additional format string?
Comment 3 darkxst 2015-03-30 21:38:51 UTC
right, that is probably cleaner, I initially though there might be a reason for using g_snprintf, but there really doesnt seem to be. The string generated should be a pretty fixed length
Comment 4 darkxst 2015-03-30 21:41:59 UTC
Created attachment 300631 [details] [review]
tests: fix missing string format argument

This causes a build failure when building with -Werror=format-security
Comment 5 Michael Natterer 2015-04-28 03:42:15 UTC
Thanks, pushed to master:

commit c5c78182d83ed799ab87a0a55eae94f8a734996c
Author: Tim Lunn <tim@feathertop.org>
Date:   Mon Mar 30 08:19:19 2015 +1100

    tests: fix missing string format argument
    
    This causes a build failure when building with -Werror=format-security
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746984

 tests/simple/test-gegl-color.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)