[libvirt] [libvirt-glib PATCH 0/2] Fix build failures caused byt macro sync

*BLURB* Martin Kletzander (2): Properly mark unused parameters Revert back deleted glib-specific warning options libvirt-gobject/libvirt-gobject-connection.c | 2 +- libvirt-gobject/libvirt-gobject-domain-snapshot.c | 4 ++-- libvirt-gobject/libvirt-gobject-domain.c | 2 +- libvirt-gobject/libvirt-gobject-storage-vol.c | 4 ++-- m4/virt-compile-warnings.m4 | 11 +++++++++++ tests/test-events.c | 8 ++++---- 6 files changed, 21 insertions(+), 10 deletions(-) -- 2.1.3

Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- libvirt-gobject/libvirt-gobject-connection.c | 2 +- libvirt-gobject/libvirt-gobject-domain-snapshot.c | 4 ++-- libvirt-gobject/libvirt-gobject-domain.c | 2 +- libvirt-gobject/libvirt-gobject-storage-vol.c | 4 ++-- tests/test-events.c | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c index 25b4dc1..cf073a5 100644 --- a/libvirt-gobject/libvirt-gobject-connection.c +++ b/libvirt-gobject/libvirt-gobject-connection.c @@ -1715,7 +1715,7 @@ GVirConfigCapabilities *gvir_connection_get_capabilities(GVirConnection *conn, static void gvir_connection_get_capabilities_helper(GSimpleAsyncResult *res, GObject *object, - GCancellable *cancellable) + GCancellable *cancellable G_GNUC_UNUSED) { GVirConnection *conn = GVIR_CONNECTION(object); GError *err = NULL; diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c index 0ccce2a..8e71612 100644 --- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c +++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c @@ -241,7 +241,7 @@ gboolean gvir_domain_snapshot_delete (GVirDomainSnapshot *snapshot, static void _delete_async_thread(GTask *task, gpointer source_object, gpointer task_data, - GCancellable *cancellable) + GCancellable *cancellable G_GNUC_UNUSED) { GError *error = NULL; gboolean status; @@ -369,7 +369,7 @@ gboolean gvir_domain_snapshot_revert_to(GVirDomainSnapshot *snapshot, static void _revert_to_async_thread(GTask *task, gpointer source_object, gpointer task_data, - GCancellable *cancellable) + GCancellable *cancellable G_GNUC_UNUSED) { GError *error = NULL; gboolean status; diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c index 34b5e38..8df30d7 100644 --- a/libvirt-gobject/libvirt-gobject-domain.c +++ b/libvirt-gobject/libvirt-gobject-domain.c @@ -1537,7 +1537,7 @@ gvir_domain_create_snapshot(GVirDomain *dom, static void _create_snapshot_async_thread(GTask *task, gpointer source_object, gpointer task_data, - GCancellable *cancellable) + GCancellable *cancellable G_GNUC_UNUSED) { GError *error = NULL; GVirDomainSnapshot *snapshot; diff --git a/libvirt-gobject/libvirt-gobject-storage-vol.c b/libvirt-gobject/libvirt-gobject-storage-vol.c index 4c0160a..54bb0c2 100644 --- a/libvirt-gobject/libvirt-gobject-storage-vol.c +++ b/libvirt-gobject/libvirt-gobject-storage-vol.c @@ -367,7 +367,7 @@ gboolean gvir_storage_vol_download(GVirStorageVol *vol, GVirStream *stream, guint64 offset, guint64 length, - guint flags, + guint flags G_GNUC_UNUSED, GError **err) { virStreamPtr stream_handle = NULL; @@ -413,7 +413,7 @@ gboolean gvir_storage_vol_upload(GVirStorageVol *vol, GVirStream *stream, guint64 offset, guint64 length, - guint flags, + guint flags G_GNUC_UNUSED, GError **err) { virStreamPtr stream_handle = NULL; diff --git a/tests/test-events.c b/tests/test-events.c index ee7ff0b..8afb557 100644 --- a/tests/test-events.c +++ b/tests/test-events.c @@ -56,7 +56,7 @@ static gboolean check_destroyed(gpointer user_data) } -static void watch_cb(int watch, int fd, int events, void *opaque) +static void watch_cb(int watch, int fd, int events, void *opaque G_GNUC_UNUSED) { g_assert_cmpint(watch_id, !=, -1); g_assert_cmpint(watch, ==, watch_id); @@ -66,7 +66,7 @@ static void watch_cb(int watch, int fd, int events, void *opaque) } -static gboolean test_watch(gpointer user_data) +static gboolean test_watch(gpointer user_data G_GNUC_UNUSED) { int removal_status; @@ -113,7 +113,7 @@ static void timeout_destroyed(void *opaque) } -static void timeout_cb(int timer, void *opaque) +static void timeout_cb(int timer, void *opaque G_GNUC_UNUSED) { g_assert_cmpint(timeout_id, !=, -1); g_assert_cmpint(timer, ==, timeout_id); @@ -122,7 +122,7 @@ static void timeout_cb(int timer, void *opaque) } -static gboolean test_timeout(gpointer user_data) +static gboolean test_timeout(gpointer user_data G_GNUC_UNUSED) { int removal_status; -- 2.1.3

Commit f525ba7796a2fd35bf55e88fb94459b2277fcd67 copied warning macros from gnulib without keeping glib-specific settings. This build-breaker brings back those needed ones except unused-parameter, which is no longer needed. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- m4/virt-compile-warnings.m4 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 5081ab6..0cf67fa 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -124,6 +124,17 @@ AC_DEFUN([LIBVIRT_GLIB_COMPILE_WARNINGS],[ dontwarn="$dontwarn -Woverlength-strings" dontwarn="$dontwarn -Wstack-protector" + # g_clear_object & G_ATOMIC_OP_USE_GCC_BUILTINS causes + # violations with this. XXX Fix glib ? + dontwarn="$dontwarn -Wbad-function-cast" + + # Due to gutils.h bug in g_bit_storage + wantwarn="$wantwarn -Wno-sign-conversion" + wantwarn="$wantwarn -Wno-conversion" + # We can't enable this due to horrible spice_usb_device_get_description + # signature + wantwarn="$wantwarn -Wno-format-nonliteral" + # Get all possible GCC warnings gl_MANYWARN_ALL_GCC([maybewarn]) -- 2.1.3

On 11/13/14 16:45, Martin Kletzander wrote:
*BLURB*
Martin Kletzander (2): Properly mark unused parameters Revert back deleted glib-specific warning options
libvirt-gobject/libvirt-gobject-connection.c | 2 +- libvirt-gobject/libvirt-gobject-domain-snapshot.c | 4 ++-- libvirt-gobject/libvirt-gobject-domain.c | 2 +- libvirt-gobject/libvirt-gobject-storage-vol.c | 4 ++-- m4/virt-compile-warnings.m4 | 11 +++++++++++ tests/test-events.c | 8 ++++---- 6 files changed, 21 insertions(+), 10 deletions(-)
-- 2.1.3
ACK series Peter

On Thu, Nov 13, 2014 at 04:47:23PM +0100, Peter Krempa wrote:
On 11/13/14 16:45, Martin Kletzander wrote:
*BLURB*
Martin Kletzander (2): Properly mark unused parameters Revert back deleted glib-specific warning options
libvirt-gobject/libvirt-gobject-connection.c | 2 +- libvirt-gobject/libvirt-gobject-domain-snapshot.c | 4 ++-- libvirt-gobject/libvirt-gobject-domain.c | 2 +- libvirt-gobject/libvirt-gobject-storage-vol.c | 4 ++-- m4/virt-compile-warnings.m4 | 11 +++++++++++ tests/test-events.c | 8 ++++---- 6 files changed, 21 insertions(+), 10 deletions(-)
-- 2.1.3
ACK series
Thank you, I could've pushed it as a build-breaker, but I rather sent it for review. Pushed now. Martin
participants (2)
-
Martin Kletzander
-
Peter Krempa