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 750480 - Fix -Werror build for clang
Fix -Werror build for clang
Product: libgdata
Classification: Platform
Component: General
git master
Other FreeBSD
: Normal normal
: ---
Assigned To: libgdata-maint
Depends on:
Reported: 2015-06-06 12:44 UTC by Ting-Wei Lan
Modified: 2015-06-09 10:02 UTC
See Also:
GNOME target: ---
GNOME version: ---

[PATCH] build: Fix -Werror build for clang (5.14 KB, patch)
2015-06-06 12:45 UTC, Ting-Wei Lan
none Details | Review
build: Fix -Werror build for clang (1.17 KB, patch)
2015-06-09 08:05 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2015-06-06 12:44:12 UTC
libgdata was switched to autoconf-archive and enabled -Werror recently. The attached patch fixes -Werror build when compiling with clang.
Comment 1 Ting-Wei Lan 2015-06-06 12:45:39 UTC
Created attachment 304687 [details] [review]
[PATCH] build: Fix -Werror build for clang
Comment 2 Philip Withnall 2015-06-09 07:30:28 UTC
Review of attachment 304687 [details] [review]:

The changes to the unit tests are incorrect — those functions are currently unused because the tests need updating, not because the tests need removing. The compiler warnings are there as a reminder of this, so simply removing the code is the wrong approach. The tests need to be fixed.

The change to GDataBatchFeed is good — please split it out into a separate patch.

::: gdata/gdata-batch-feed.c
@@ +125,3 @@
 			g_assert (klass->parse_error_response != NULL);
+			klass->parse_error_response (service, (GDataOperationType) op->type, status_code,
+			                             status_reason, (gchar*) xmlBufferContent (status_response),

This bit is valuable; please split it out into a separate patch.
Comment 3 Ting-Wei Lan 2015-06-09 08:05:48 UTC
Created attachment 304829 [details] [review]
build: Fix -Werror build for clang

All changes to tests are removed. I added --disable-always-build-tests to my configure arguments, so I can keep testing -Werror without modifying tests.
Comment 4 Philip Withnall 2015-06-09 09:15:01 UTC
Review of attachment 304829 [details] [review]:

Great, please commit this one, thanks.
Comment 5 Ting-Wei Lan 2015-06-09 10:02:01 UTC
Attachment 304829 [details] pushed as 1dd9274 - build: Fix -Werror build for clang