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 750914 - Build fails because -Werror=unused-function
Build fails because -Werror=unused-function
Status: RESOLVED FIXED
Product: libgdata
Classification: Platform
Component: General
git master
Other Linux
: Normal major
: ---
Assigned To: libgdata-maint
libgdata-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-13 23:42 UTC by Mattias Bengtsson
Modified: 2015-07-10 11:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mattias Bengtsson 2015-06-13 23:42:38 UTC
I tried building libgdata with jhbuild right now and it fails for me because the flag -Werror=unused-function is set. Unfortunately the scrollback is lost, so I can't post a log of the output but basically there seems to be a bunch of functions that aren't called

I can get around it by adding the following to my jhbuildrc:

> module_extra_env['libgdata'] = { "CFLAGS": "-Wno-error=unused-function" }

But I hope that's not what I'm supposed to do. :)
Comment 1 Philip Withnall 2015-06-14 09:30:50 UTC
Yes, it’s due to a load of unit test functions which not being used because the tests haven’t been updated to fix various issues which appeared recently. I haven’t commented out the functions so that the warning is a reminder that this still needs fixing.

Basically, those unit tests need to be updated. Patches welcome.
Comment 2 Philip Withnall 2015-07-10 11:51:27 UTC
I’ve spent a while fixing this up for the YouTube tests. Don’t have any time left to do it for Contacts and PicasaWeb.

commit b63fc7063d6b62c9f4f7ba745c94060546bb06c8
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Fri Jul 10 12:49:35 2015 +0100

    tests: Mark some unused functions as unused
    
    After porting all of the YouTube tests, the Contacts and PicasaWeb tests
    need a bit more love to get them working. Because time is short, just
    mark these ones as __attribute__((unused)), or comment them out, and I
    will come back to them later. FIXMEs added.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750914

 gdata/tests/contacts.c  | 4 ++++
 gdata/tests/picasaweb.c | 3 +++
 2 files changed, 7 insertions(+)