[libgdata] [core] Fix some warnings



commit d51293735acc3e136374a5d3c0cc589e13936011
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Aug 6 20:07:47 2009 +0100

    [core] Fix some warnings

 gdata/gdata-buffer.c                             |    2 +-
 gdata/services/picasaweb/gdata-picasaweb-album.c |    2 +-
 gdata/services/picasaweb/gdata-picasaweb-file.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdata/gdata-buffer.c b/gdata/gdata-buffer.c
index 3da67b4..f3137ca 100644
--- a/gdata/gdata-buffer.c
+++ b/gdata/gdata-buffer.c
@@ -126,7 +126,7 @@ gdata_buffer_push_data (GDataBuffer *self, const guint8 *data, gsize length)
 
 	/* Create the chunk */
 	chunk = g_malloc (sizeof (GDataBufferChunk) + length);
-	chunk->data = (gpointer) chunk + (gsize) sizeof (GDataBufferChunk);
+	chunk->data = (guint8*) ((guint8*) chunk + sizeof (GDataBufferChunk)); /* pointer arithmetic in terms of bytes here */
 	chunk->length = length;
 	chunk->next = NULL;
 
diff --git a/gdata/services/picasaweb/gdata-picasaweb-album.c b/gdata/services/picasaweb/gdata-picasaweb-album.c
index 5586377..e257e39 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-album.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-album.c
@@ -737,7 +737,7 @@ get_xml (GDataParsable *parsable, GString *xml_string)
 	if (priv->timestamp.tv_sec != 0 || priv->timestamp.tv_usec != 0) {
 		/* in milliseconds */
 		g_string_append_printf (xml_string, "<gphoto:timestamp>%" G_GUINT64_FORMAT "</gphoto:timestamp>",
-					priv->timestamp.tv_sec * 1000 + priv->timestamp.tv_usec);
+					(guint64) (priv->timestamp.tv_sec * 1000 + priv->timestamp.tv_usec));
 	}
 
 	if (priv->is_commenting_enabled == FALSE)
diff --git a/gdata/services/picasaweb/gdata-picasaweb-file.c b/gdata/services/picasaweb/gdata-picasaweb-file.c
index 2bd1927..cc50998 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-file.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-file.c
@@ -947,7 +947,7 @@ get_xml (GDataParsable *parsable, GString *xml_string)
 	if (priv->timestamp.tv_sec != 0 || priv->timestamp.tv_usec != 0) {
 		/* timestamp is in milliseconds */
 		g_string_append_printf (xml_string, "<gphoto:timestamp>%" G_GUINT64_FORMAT "</gphoto:timestamp>",
-					priv->timestamp.tv_sec * 1000 + priv->timestamp.tv_usec);
+					(guint64) (priv->timestamp.tv_sec * 1000 + priv->timestamp.tv_usec));
 		/* RHSTODO: test that different timestamps are being set in this XML correctly and are
 		   in fact just being ignored by Google */
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]