[libdmapsharing] Various compile warning fixes
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Various compile warning fixes
- Date: Sun, 3 Apr 2011 22:48:05 +0000 (UTC)
commit e09682a9b435a5a4e1266ef6de73dfd1c3f557ac
Author: W. Michael Petullo <mike flyn org>
Date: Sun Apr 3 17:46:57 2011 -0500
Various compile warning fixes
See also https://bugzilla.gnome.org/show_bug.cgi?id=646610.
Signed-off-by: W. Michael Petullo <mike flyn org>
libdmapsharing/daap-connection.c | 7 +++++--
libdmapsharing/dacp-connection.c | 5 ++++-
libdmapsharing/dacp-share.c | 13 +++++++------
libdmapsharing/dmap-connection.c | 8 ++++----
libdmapsharing/dmap-gst-input-stream.c | 10 ++++++----
libdmapsharing/dmap-share.c | 19 +++++++++++--------
libdmapsharing/dpap-connection.c | 6 +++---
libdmapsharing/dpap-share.c | 4 ++--
8 files changed, 42 insertions(+), 30 deletions(-)
---
diff --git a/libdmapsharing/daap-connection.c b/libdmapsharing/daap-connection.c
index 43771f1..28b88b7 100644
--- a/libdmapsharing/daap-connection.c
+++ b/libdmapsharing/daap-connection.c
@@ -37,7 +37,7 @@ get_protocol_version_cc (DMAPConnection * connection)
}
static gchar *
-get_query_metadata (void)
+get_query_metadata (DMAPConnection * connection)
{
return g_strdup ("dmap.itemid,dmap.itemname,daap.songalbum,"
"daap.songartist,daap.songgenre,daap.songsize,"
@@ -58,7 +58,8 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
const gchar *artist = NULL;
const gchar *format = NULL;
const gchar *genre = NULL;
- const gchar *streamURI = NULL;
+ // FIXME: not used?
+ // const gchar *streamURI = NULL;
const gchar *sort_artist = NULL;
const gchar *sort_album = NULL;
gint length = 0;
@@ -111,10 +112,12 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
case DMAP_CC_ASBR:
bitrate = g_value_get_int (&(meta_item->content));
break;
+ /* FIXME: not used?
case DMAP_CC_ASUL:
streamURI =
g_value_get_string (&(meta_item->content));
break;
+ */
case DMAP_CC_ASSA:
sort_artist =
g_value_get_string (&(meta_item->content));
diff --git a/libdmapsharing/dacp-connection.c b/libdmapsharing/dacp-connection.c
index 9b5e64b..6ffdc3a 100644
--- a/libdmapsharing/dacp-connection.c
+++ b/libdmapsharing/dacp-connection.c
@@ -35,13 +35,15 @@ get_protocol_version_cc (DMAPConnection * connection)
{
/* FIXME: */
g_error ("Not implemented");
+ return 0;
}
static gchar *
-get_query_metadata (void)
+get_query_metadata (DMAPConnection * connection)
{
/* FIXME: */
g_error ("Not implemented");
+ return NULL;
}
static DMAPRecord *
@@ -50,6 +52,7 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
{
/* FIXME: */
g_error ("Not implemented");
+ return NULL;
}
static void
diff --git a/libdmapsharing/dacp-share.c b/libdmapsharing/dacp-share.c
index ece1ba5..8be3f7d 100644
--- a/libdmapsharing/dacp-share.c
+++ b/libdmapsharing/dacp-share.c
@@ -43,6 +43,7 @@
#include <libdmapsharing/dmap-share.h>
#include <libdmapsharing/dacp-share.h>
+#include <libdmapsharing/dacp-connection.h>
#include <libdmapsharing/dacp-player.h>
static void dacp_share_set_property (GObject * object,
@@ -801,12 +802,11 @@ dacp_share_ctrl_int (DMAPShare * share,
soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
} else if (g_ascii_strcasecmp ("/1/getspeakers", rest_of_path) == 0) {
GNode *casp;
- GNode *mdcl;
casp = dmap_structure_add (NULL, DMAP_CC_CASP);
dmap_structure_add (casp, DMAP_CC_MSTT,
(gint32) DMAP_STATUS_OK);
- mdcl = dmap_structure_add (casp, DMAP_CC_MDCL);
+ dmap_structure_add (casp, DMAP_CC_MDCL);
dmap_structure_add (casp, DMAP_CC_CAIA, TRUE);
dmap_structure_add (casp, DMAP_CC_MINM, "Computer");
@@ -1090,10 +1090,11 @@ dacp_share_pair (DACPShare * share, gchar * service_name, gchar passcode[4])
g_object_get (share, "name", &name, NULL);
- remote_info->connection = dacp_connection_new (name,
- remote_info->host,
- remote_info->port,
- FALSE, NULL, NULL);
+ remote_info->connection = DMAP_CONNECTION (dacp_connection_new (name,
+ remote_info->host, remote_info->port,
+ FALSE,
+ NULL,
+ NULL));
/* This is required since we don't call DMAPConnection default handler */
dmap_connection_setup (remote_info->connection);
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index 1f5228a..c68ead3 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -869,8 +869,8 @@ handle_song_listing (DMAPConnection * connection,
gint returned_count;
gint i;
GNode *n;
- gint specified_total_count;
- gboolean update_type;
+ // FIXME: unused? gint specified_total_count;
+ // FIXME: unused? gboolean update_type;
gint commit_batch;
/* get the songs */
@@ -899,7 +899,7 @@ handle_song_listing (DMAPConnection * connection,
dmap_connection_state_done (connection, FALSE);
return;
}
- specified_total_count = g_value_get_int (&(item->content));
+ // FIXME: unused? specified_total_count = g_value_get_int (&(item->content));
item = dmap_structure_find_item (structure, DMAP_CC_MUTY);
if (item == NULL) {
@@ -907,7 +907,7 @@ handle_song_listing (DMAPConnection * connection,
dmap_connection_state_done (connection, FALSE);
return;
}
- update_type = g_value_get_char (&(item->content));
+ // FIXME: unused? update_type = g_value_get_char (&(item->content));
listing_node = dmap_structure_find_node (structure, DMAP_CC_MLCL);
if (listing_node == NULL) {
diff --git a/libdmapsharing/dmap-gst-input-stream.c b/libdmapsharing/dmap-gst-input-stream.c
index 96a9bc7..1318f34 100644
--- a/libdmapsharing/dmap-gst-input-stream.c
+++ b/libdmapsharing/dmap-gst-input-stream.c
@@ -26,6 +26,8 @@
#include <gst/app/gstappbuffer.h>
#include "dmap-gst-input-stream.h"
+#include "dmap-gst-mp3-input-stream.h"
+#include "dmap-gst-wav-input-stream.h"
#include "gst-util.h"
#define GST_APP_MAX_BUFFERS 1024
@@ -85,10 +87,10 @@ dmap_gst_input_stream_seek (GSeekable * seekable,
GSeekType type,
GCancellable * cacellable, GError ** error)
{
- DMAPGstInputStream *stream;
- goffset absolute;
+ // FIXME: implement: DMAPGstInputStream *stream;
+ // FIXME: implement: goffset absolute;
- stream = DMAP_GST_INPUT_STREAM (seekable);
+ // FIXME: implement: stream = DMAP_GST_INPUT_STREAM (seekable);
switch (type) {
/* FIXME: implement:
@@ -102,7 +104,7 @@ dmap_gst_input_stream_seek (GSeekable * seekable,
*/
case G_SEEK_SET:
- absolute = offset;
+ // FIXME: implement: absolute = offset;
break;
default:
diff --git a/libdmapsharing/dmap-share.c b/libdmapsharing/dmap-share.c
index 2bb6cba..74cb9b1 100644
--- a/libdmapsharing/dmap-share.c
+++ b/libdmapsharing/dmap-share.c
@@ -97,6 +97,9 @@ struct DMAPSharePrivate
GHashTable *session_ids;
};
+typedef void (*ShareBitwiseDestroyFunc) (void *);
+typedef DMAPRecord *(*ShareBitwiseLookupByIdFunc) (void *db, guint id);
+
/* FIXME: name this something else, as it is more than just share/bitwise now */
struct share_bitwise_t
{
@@ -499,7 +502,6 @@ static void
_dmap_share_set_name (DMAPShare * share, const char *name)
{
GError *error;
- gboolean res;
g_return_if_fail (share != NULL);
@@ -508,10 +510,11 @@ _dmap_share_set_name (DMAPShare * share, const char *name)
if (share->priv->published) {
error = NULL;
- res = dmap_mdns_publisher_rename_at_port (share->priv->
- publisher,
- share->priv->port,
- name, &error);
+ dmap_mdns_publisher_rename_at_port (share->priv->
+ publisher,
+ share->priv->port,
+ name,
+ &error);
if (error != NULL) {
g_warning ("Unable to change MDNS service name: %s",
error->message);
@@ -1887,16 +1890,16 @@ _dmap_share_databases (DMAPShare * share,
share_bitwise->size = 0;
if (record_query) {
share_bitwise->db = records;
- share_bitwise->lookup_by_id =
+ share_bitwise->lookup_by_id = (ShareBitwiseLookupByIdFunc)
g_hash_table_lookup_adapter;
- share_bitwise->destroy = g_hash_table_destroy;
+ share_bitwise->destroy = (ShareBitwiseDestroyFunc) g_hash_table_destroy;
g_hash_table_foreach (records,
(GHFunc)
accumulate_mlcl_size_and_ids,
share_bitwise);
} else {
share_bitwise->db = share->priv->db;
- share_bitwise->lookup_by_id = dmap_db_lookup_by_id;
+ share_bitwise->lookup_by_id = (ShareBitwiseLookupByIdFunc) dmap_db_lookup_by_id;
share_bitwise->destroy = NULL;
dmap_db_foreach (share->priv->db,
(GHFunc)
diff --git a/libdmapsharing/dpap-connection.c b/libdmapsharing/dpap-connection.c
index 4711a9a..9b356e0 100644
--- a/libdmapsharing/dpap-connection.c
+++ b/libdmapsharing/dpap-connection.c
@@ -37,7 +37,7 @@ get_protocol_version_cc (DMAPConnection * connection)
}
static gchar *
-get_query_metadata (void)
+get_query_metadata (DMAPConnection * connection)
{
return g_strdup ("all");
}
@@ -53,7 +53,7 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
const gchar *format = NULL;
const gchar *comments = NULL;
const gchar *thumbnail = NULL;
- const GByteArray *ptr = NULL;
+ GByteArray *ptr = NULL;
gint creation_date = 0;
gint filesize = 0;
gint large_filesize = 0;
@@ -119,7 +119,7 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
if (filesize) {
ptr = g_byte_array_sized_new (filesize);
- g_byte_array_append (ptr, thumbnail, filesize);
+ g_byte_array_append (ptr, (guint8 *) thumbnail, filesize);
} else {
ptr = g_byte_array_sized_new (0);
}
diff --git a/libdmapsharing/dpap-share.c b/libdmapsharing/dpap-share.c
index 2263692..5b5628d 100644
--- a/libdmapsharing/dpap-share.c
+++ b/libdmapsharing/dpap-share.c
@@ -416,7 +416,6 @@ add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer _mb)
}
if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGEFILESIZE)) {
GByteArray *thumbnail = NULL;
- gint filesize = 0;
g_object_get (record, "thumbnail", &thumbnail, NULL);
dmap_structure_add (mlit, DMAP_CC_PIFS,
@@ -468,7 +467,8 @@ add_entry_to_mlcl (gpointer id, DMAPRecord * record, gpointer _mb)
data = thumbnail->data;
size = thumbnail->len;
} else {
- data = size = 0;
+ data = NULL;
+ size = 0;
}
} else {
/* Should be PHOTO_HIRES */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]