summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2018-09-08 23:58:21 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2018-09-10 13:12:48 +0300
commit4e9205d6f39ea2d492717fa2c6db4c2b142fb4e6 (patch)
treec7b3c4c8911965120f7f6eacd7b9db2c17f0b090
parent13a4a9a5c2badae9d18b9b437573be5c65b772d7 (diff)
downloadlibgnome-volume-control-4e9205d6f39ea2d492717fa2c6db4c2b142fb4e6.tar.gz
fix cast-function-type warnings
gvc-mixer-card.c: In function ‘gvc_mixer_card_finalize’: gvc-mixer-card.c:571:53: warning: cast between incompatible function types from ‘void (*)(GvcMixerCardProfile *)’ {aka ‘void (*)(struct <anonymous> *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type] g_list_foreach (mixer_card->priv->profiles, (GFunc) free_profile, NULL); gvc-mixer-stream.c: In function ‘gvc_mixer_stream_finalize’: gvc-mixer-stream.c:1044:52: warning: cast between incompatible function types from ‘void (*)(GvcMixerStreamPort *)’ {aka ‘void (*)(struct <anonymous> *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type] g_list_foreach (mixer_stream->priv->ports, (GFunc) free_port, NULL);
-rw-r--r--gvc-mixer-card.c3
-rw-r--r--gvc-mixer-stream.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/gvc-mixer-card.c b/gvc-mixer-card.c
index ba31ab2..0856493 100644
--- a/gvc-mixer-card.c
+++ b/gvc-mixer-card.c
@@ -564,8 +564,7 @@ gvc_mixer_card_finalize (GObject *object)
g_free (mixer_card->priv->human_profile);
mixer_card->priv->human_profile = NULL;
- g_list_foreach (mixer_card->priv->profiles, (GFunc) free_profile, NULL);
- g_list_free (mixer_card->priv->profiles);
+ g_list_free_full (mixer_card->priv->profiles, (GDestroyNotify) free_profile);
mixer_card->priv->profiles = NULL;
g_list_free_full (mixer_card->priv->ports, (GDestroyNotify) free_port);
diff --git a/gvc-mixer-stream.c b/gvc-mixer-stream.c
index 5de71d1..b136a14 100644
--- a/gvc-mixer-stream.c
+++ b/gvc-mixer-stream.c
@@ -1038,8 +1038,7 @@ gvc_mixer_stream_finalize (GObject *object)
g_free (mixer_stream->priv->human_port);
mixer_stream->priv->human_port = NULL;
- g_list_foreach (mixer_stream->priv->ports, (GFunc) free_port, NULL);
- g_list_free (mixer_stream->priv->ports);
+ g_list_free_full (mixer_stream->priv->ports, (GDestroyNotify) free_port);
mixer_stream->priv->ports = NULL;
if (mixer_stream->priv->change_volume_op) {