[sushi] all: fix some compilation warnings
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] all: fix some compilation warnings
- Date: Mon, 5 Mar 2012 16:37:03 +0000 (UTC)
commit 1db71843abfac09d9f502aefdf8cdd0afaa29443
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 5 11:25:36 2012 -0500
all: fix some compilation warnings
configure.ac | 1 +
src/libsushi/sushi-cover-art.c | 4 ----
src/libsushi/sushi-file-loader.c | 3 +--
src/libsushi/sushi-font-loader.c | 7 +++----
src/libsushi/sushi-font-widget.c | 10 +---------
src/libsushi/sushi-pdf-loader.c | 1 +
src/libsushi/sushi-sound-player.c | 8 +-------
src/main.c | 2 ++
8 files changed, 10 insertions(+), 26 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bd24def..834370b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,7 @@ PKG_CHECK_MODULES(SUSHI,
gjs-dbus-1.0 >= $GJS_MIN_VERSION
gobject-2.0 >= $GLIB_MIN_VERSION
clutter-1.0 >= $CLUTTER_MIN_VERSION
+ clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
gtk+-3.0 >= $GTK_MIN_VERSION
clutter-gtk-1.0 >= $CLUTTER_GTK_MIN_VERSION
clutter-gst-1.0
diff --git a/src/libsushi/sushi-cover-art.c b/src/libsushi/sushi-cover-art.c
index c8adc49..6e4fae4 100644
--- a/src/libsushi/sushi-cover-art.c
+++ b/src/libsushi/sushi-cover-art.c
@@ -109,7 +109,6 @@ sushi_cover_art_fetcher_set_property (GObject *gobject,
GParamSpec *pspec)
{
SushiCoverArtFetcher *self = SUSHI_COVER_ART_FETCHER (gobject);
- SushiCoverArtFetcherPrivate *priv = SUSHI_COVER_ART_FETCHER_GET_PRIVATE (self);
switch (prop_id) {
case PROP_TAGLIST:
@@ -283,9 +282,7 @@ sushi_cover_art_fetcher_get_uri_for_track_async (SushiCoverArtFetcher *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- GSimpleAsyncResult *result;
FetchUriJob *job;
- SushiCoverArtFetcherPrivate *priv = SUSHI_COVER_ART_FETCHER_GET_PRIVATE (self);
job = fetch_uri_job_new (self, artist, album, callback, user_data);
g_io_scheduler_push_job (fetch_uri_job,
@@ -535,7 +532,6 @@ try_fetch_from_amazon (SushiCoverArtFetcher *self)
SushiCoverArtFetcherPrivate *priv = SUSHI_COVER_ART_FETCHER_GET_PRIVATE (self);
gchar *artist = NULL;
gchar *album = NULL;
- GFile *file;
gst_tag_list_get_string (priv->taglist,
GST_TAG_ARTIST, &artist);
diff --git a/src/libsushi/sushi-file-loader.c b/src/libsushi/sushi-file-loader.c
index 6dd4158..91972f8 100644
--- a/src/libsushi/sushi-file-loader.c
+++ b/src/libsushi/sushi-file-loader.c
@@ -120,8 +120,7 @@ static inline gboolean
seen_inode (DeepCountState *state,
GFileInfo *info)
{
- guint64 inode, inode2;
- guint i;
+ guint64 inode;
inode = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_UNIX_INODE);
diff --git a/src/libsushi/sushi-font-loader.c b/src/libsushi/sushi-font-loader.c
index 1e1b12a..fdf91e7 100644
--- a/src/libsushi/sushi-font-loader.c
+++ b/src/libsushi/sushi-font-loader.c
@@ -98,7 +98,7 @@ create_face_from_contents (FontLoadJob *job,
FT_Face retval;
ft_error = FT_New_Memory_Face (job->library,
- job->face_contents,
+ (const FT_Byte *) job->face_contents,
(FT_Long) job->face_length,
job->face_index,
&retval);
@@ -135,10 +135,9 @@ font_load_job (GIOSchedulerJob *sched_job,
GError *error = NULL;
gchar *contents;
gsize length;
- gboolean res;
- res = g_file_load_contents (job->file, NULL,
- &contents, &length, NULL, &error);
+ g_file_load_contents (job->file, NULL,
+ &contents, &length, NULL, &error);
if (error != NULL) {
g_simple_async_result_take_error (job->result, error);
diff --git a/src/libsushi/sushi-font-widget.c b/src/libsushi/sushi-font-widget.c
index 28b5434..1005559 100644
--- a/src/libsushi/sushi-font-widget.c
+++ b/src/libsushi/sushi-font-widget.c
@@ -83,7 +83,6 @@ draw_string (cairo_t *cr,
gint *pos_y)
{
cairo_text_extents_t extents;
- gdouble cur_x, cur_y;
cairo_text_extents (cr, text, &extents);
@@ -386,16 +385,12 @@ sushi_font_widget_draw (GtkWidget *drawing_area,
SushiFontWidget *self = SUSHI_FONT_WIDGET (drawing_area);
SushiFontWidgetPrivate *priv = self->priv;
gint *sizes = NULL, n_sizes, alpha_size, pos_y = 0, i;
- const gchar *text;
cairo_font_face_t *font;
FT_Face face = priv->face;
- gboolean res;
GtkStyleContext *context;
GdkRGBA color;
GtkBorder padding;
GtkStateFlags state;
- gint max_x = 0;
- gchar *font_name;
if (face == NULL)
goto end;
@@ -455,12 +450,9 @@ font_face_async_ready_cb (GObject *object,
gpointer user_data)
{
SushiFontWidget *self = user_data;
- FT_Face face;
- gchar *contents = NULL;
GError *error = NULL;
- gint i, res;
- face = self->priv->face =
+ self->priv->face =
sushi_new_ft_face_from_uri_finish (result,
&self->priv->face_contents,
&error);
diff --git a/src/libsushi/sushi-pdf-loader.c b/src/libsushi/sushi-pdf-loader.c
index b8f822d..c2bdf6a 100644
--- a/src/libsushi/sushi-pdf-loader.c
+++ b/src/libsushi/sushi-pdf-loader.c
@@ -30,6 +30,7 @@
#include "sushi-utils.h"
#include <evince-document.h>
#include <evince-view.h>
+#include <glib/gstdio.h>
G_DEFINE_TYPE (SushiPdfLoader, sushi_pdf_loader, G_TYPE_OBJECT);
diff --git a/src/libsushi/sushi-sound-player.c b/src/libsushi/sushi-sound-player.c
index 2573b34..dd5f6d1 100644
--- a/src/libsushi/sushi-sound-player.c
+++ b/src/libsushi/sushi-sound-player.c
@@ -694,11 +694,7 @@ sushi_sound_player_set_property (GObject *gobject,
const GValue *value,
GParamSpec *pspec)
{
- SushiSoundPlayer *player;
- SushiSoundPlayerPrivate *priv;
-
- player = SUSHI_SOUND_PLAYER (gobject);
- priv = SUSHI_SOUND_PLAYER_GET_PRIVATE (player);
+ SushiSoundPlayer *player = SUSHI_SOUND_PLAYER (gobject);
switch (prop_id)
{
@@ -799,8 +795,6 @@ sushi_sound_player_class_init (SushiSoundPlayerClass *klass)
static void
sushi_sound_player_init (SushiSoundPlayer *player)
{
- SushiSoundPlayerPrivate *priv;
-
player->priv = SUSHI_SOUND_PLAYER_GET_PRIVATE (player);
player->priv->state = SUSHI_SOUND_PLAYER_STATE_UNKNOWN;
diff --git a/src/main.c b/src/main.c
index e0f4f31..ea71cfe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,6 +43,8 @@
#endif
#include <clutter/clutter.h>
+#include <clutter/x11/clutter-x11.h>
+#include <clutter-gst/clutter-gst.h>
#include <clutter-gtk/clutter-gtk.h>
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]