Commit cea4b17c authored by W. Michael Petullo's avatar W. Michael Petullo
Browse files

fix some compiler warnings


Signed-off-by: W. Michael Petullo's avatarW. Michael Petullo <mike@flyn.org>
parent 8ea1adb3
......@@ -861,7 +861,7 @@ dacp_share_ctrl_int (DMAPShare * share,
== 0) {
guint width = 320;
guint height = 320;
gchar *artwork_filename;
guchar *artwork_filename;
gchar *buffer;
gsize buffer_len;
......@@ -881,7 +881,7 @@ dacp_share_ctrl_int (DMAPShare * share,
}
#ifdef HAVE_GDKPIXBUF
GdkPixbuf *artwork =
gdk_pixbuf_new_from_file_at_scale (artwork_filename,
gdk_pixbuf_new_from_file_at_scale ((char *) artwork_filename,
width, height,
TRUE, NULL);
......
......@@ -307,7 +307,7 @@ dmap_gst_input_stream_read (GInputStream * stream,
DMAPGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
gint64 end_time;
end_time = end_time = g_get_monotonic_time () + QUEUE_POP_WAIT_SECONDS * G_TIME_SPAN_SECOND;
end_time = g_get_monotonic_time () + QUEUE_POP_WAIT_SECONDS * G_TIME_SPAN_SECOND;
g_mutex_lock (&gst_stream->priv->buffer_mutex);
......
......@@ -142,6 +142,7 @@ DMAP_MD5Final (DMAPHashContext * ctx, unsigned char digest[16])
{
unsigned count;
unsigned char *p;
guint32 *tmp;
/* Compute number of bytes mod 64 */
count = (ctx->bits[0] >> 3) & 0x3F;
......@@ -170,8 +171,9 @@ DMAP_MD5Final (DMAPHashContext * ctx, unsigned char digest[16])
byteReverse (ctx->in, 14);
/* Append length in bits and transform */
((guint32 *) ctx->in)[14] = ctx->bits[0];
((guint32 *) ctx->in)[15] = ctx->bits[1];
tmp = (guint32 *) ctx->in;
tmp[14] = ctx->bits[0];
tmp[15] = ctx->bits[1];
MD5Transform (ctx->buf, (guint32 *) ctx->in, ctx->version);
byteReverse ((unsigned char *) ctx->buf, 4);
......@@ -525,19 +527,19 @@ void dmap_hash_progressive_final (DMAPHashContext *context,
#ifdef HAVE_CHECK
START_TEST(test_dmap_hash_generate_v3_h2)
{
char hash[33] = { 0 };
char *url = "test://foo";
guchar hash[33] = { 0 };
guchar *url = (guchar *) "test://foo";
dmap_hash_generate (3, url, 2, hash, 0);
fail_unless (! strcmp (hash, "798A9D80B6F08E339603BE83E0FEAD03"));
fail_unless (! memcmp (hash, "798A9D80B6F08E339603BE83E0FEAD03", strlen ("798A9D80B6F08E339603BE83E0FEAD03")));
}
END_TEST
START_TEST(test_dmap_hash_progressive)
{
char buf[16] = { 0 };
char hash1[33] = { 0 };
char hash2[33] = { 0 };
char *value = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
guchar buf[16] = { 0 };
guchar hash1[33] = { 0 };
guchar hash2[33] = { 0 };
guchar *value = (guchar *) "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
DMAPHashContext context;
dmap_hash_progressive_init (&context);
......@@ -552,7 +554,7 @@ START_TEST(test_dmap_hash_progressive)
dmap_hash_generate (3, value, 2, hash2, 0);
fail_unless (! strcmp (hash1, hash2));
fail_unless (! memcmp (hash1, hash2, 32));
}
END_TEST
......
......@@ -38,7 +38,7 @@ dmap_write_next_chunk (SoupMessage * message, ChunkData * cd)
if (read_size > 0) {
soup_message_body_append (message->response_body,
SOUP_MEMORY_TAKE, chunk, read_size);
g_debug ("Read/wrote %d bytes.", read_size);
g_debug ("Read/wrote %ld bytes.", read_size);
} else {
if (error != NULL) {
g_warning ("Error reading from input stream: %s",
......
......@@ -63,7 +63,7 @@ create_share (guint conn_type)
(dmap_container_record));
DMAPRecordFactory *factory;
DMAPRecord *record;
DMAPShare *share;
DMAPShare *share = NULL;
DMAPDb *db;
if (conn_type == DAAP) {
......@@ -94,6 +94,8 @@ create_share (guint conn_type)
NULL));
}
g_assert (NULL != share);
g_free (name);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment