From ec00b31b18d1fd3acd2a5e92e2060685a5a22ec5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 29 Oct 2012 16:45:25 +0530 Subject: [PATCH] bluez: Fix a number of compiler warnings --- sys/bluez/gsta2dpsrc.c | 2 +- sys/bluez/gsta2dpsrc.h | 2 ++ sys/bluez/gstavdtpsrc.c | 9 +++++++-- sys/bluez/gstavdtpsrc.h | 2 ++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/bluez/gsta2dpsrc.c b/sys/bluez/gsta2dpsrc.c index 00a355eb1e..8f00c5eb60 100644 --- a/sys/bluez/gsta2dpsrc.c +++ b/sys/bluez/gsta2dpsrc.c @@ -90,7 +90,7 @@ gst_a2dp_src_init (GstA2dpSrc * a2dpsrc, GstA2dpSrcClass * klass) { GstBin *bin = GST_BIN (a2dpsrc); GstElement *depay = NULL; - GstPad *srcpad, *depay_srcpad; + GstPad *srcpad = NULL, *depay_srcpad; /* FIXME: We can set up the bin elements here since we only support * SBC. When supporting more formats, we would need to only instantiate diff --git a/sys/bluez/gsta2dpsrc.h b/sys/bluez/gsta2dpsrc.h index e6dcdd6982..34eb8a0ed4 100644 --- a/sys/bluez/gsta2dpsrc.h +++ b/sys/bluez/gsta2dpsrc.h @@ -53,6 +53,8 @@ struct _GstA2dpSrc GstPad *srcpad; }; +GType gst_a2dp_src_get_type (void); + gboolean gst_a2dp_src_plugin_init (GstPlugin * plugin); G_END_DECLS diff --git a/sys/bluez/gstavdtpsrc.c b/sys/bluez/gstavdtpsrc.c index 3e224e23b9..3942dcd697 100644 --- a/sys/bluez/gstavdtpsrc.c +++ b/sys/bluez/gstavdtpsrc.c @@ -25,6 +25,7 @@ #include #endif +#include #include #include #include @@ -169,7 +170,7 @@ static GstCaps * gst_avdtp_src_getcaps (GstPad * pad) { GstAvdtpSrc *avdtpsrc = GST_AVDTP_SRC (gst_pad_get_parent_element (pad)); - GstCaps *ret; + GstCaps *ret = NULL; if (avdtpsrc->dev_caps) { const GValue *value; @@ -321,7 +322,7 @@ gst_avdtp_src_create (GstBaseSrc * bsrc, guint64 offset, GST_LOG_OBJECT (avdtpsrc, "Read %d bytes", ret); - if (ret < length) { + if (ret < (gint) length) { /* Create a subbuffer for as much as we've actually read */ *outbuf = gst_buffer_create_sub (buf, 0, ret); gst_buffer_unref (buf); @@ -348,6 +349,8 @@ gst_avdtp_src_unlock (GstBaseSrc * bsrc) g_atomic_int_set (&avdtpsrc->unlocked, TRUE); gst_poll_set_flushing (avdtpsrc->poll, TRUE); + + return TRUE; } static gboolean @@ -361,6 +364,8 @@ gst_avdtp_src_unlock_stop (GstBaseSrc * bsrc) /* Flush out any stale data that might be buffered */ gst_avdtp_connection_conf_recv_stream_fd (&avdtpsrc->conn); + + return TRUE; } gboolean diff --git a/sys/bluez/gstavdtpsrc.h b/sys/bluez/gstavdtpsrc.h index 9a3cb70602..67027fa481 100644 --- a/sys/bluez/gstavdtpsrc.h +++ b/sys/bluez/gstavdtpsrc.h @@ -59,6 +59,8 @@ struct _GstAvdtpSrc volatile gint unlocked; }; +GType gst_avdtp_src_get_type (void); + gboolean gst_avdtp_src_plugin_init (GstPlugin * plugin); G_END_DECLS