[pinpoint] Remove some compiler warnings



commit 96523e014584905d0810065b421e3b11c07c761b
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Aug 4 11:35:33 2011 +0100

    Remove some compiler warnings

 gst-video-thumbnailer.c |    4 ++--
 pinpoint.c              |    6 ++++++
 pinpoint.h              |    1 -
 pp-cairo.c              |    7 +------
 pp-clutter.c            |   26 ++++++++++----------------
 5 files changed, 19 insertions(+), 25 deletions(-)
---
diff --git a/gst-video-thumbnailer.c b/gst-video-thumbnailer.c
index fa2fbe2..afac878 100644
--- a/gst-video-thumbnailer.c
+++ b/gst-video-thumbnailer.c
@@ -60,9 +60,9 @@ convert_buffer_to_pixbuf (GstBuffer    *buffer,
     GstElement *src, *sink, *colorspace, *scale, *filter;
     GstBus *bus;
     GstMessage *msg;
-    GstStateChangeReturn state;
+    GstStateChangeReturn state G_GNUC_UNUSED;
     gboolean ret;
-    int width, height, dw, dh, i;
+    int dw, dh, i;
     GstStructure *s;
 
     s = gst_caps_get_structure (GST_BUFFER_CAPS (buffer), 0);
diff --git a/pinpoint.c b/pinpoint.c
index 9ab36aa..29fef95 100644
--- a/pinpoint.c
+++ b/pinpoint.c
@@ -31,6 +31,10 @@
 
 #include "pinpoint.h"
 
+#ifdef USE_CLUTTER_GST
+#include <clutter-gst/clutter-gst.h>
+#endif
+
 GList *pp_slides      = NULL; /* list of slide text */
 GList *pp_slidep      = NULL; /* current slide */
 
@@ -597,6 +601,8 @@ static void serialize_slide_config (GString       *str,
       g_string_append (str, separator);
       switch (point->position)
         {
+          case CLUTTER_GRAVITY_NONE:
+            break;
           case CLUTTER_GRAVITY_CENTER:
             g_string_append (str, "[center]");break;
           case CLUTTER_GRAVITY_NORTH:
diff --git a/pinpoint.h b/pinpoint.h
index fcd48de..5f93b29 100644
--- a/pinpoint.h
+++ b/pinpoint.h
@@ -28,7 +28,6 @@
 #include "config.h"
 #endif
 
-
 #include <clutter/clutter.h>
 
 typedef struct _PinPointPoint    PinPointPoint;
diff --git a/pp-cairo.c b/pp-cairo.c
index de58e48..a97aa41 100644
--- a/pp-cairo.c
+++ b/pp-cairo.c
@@ -92,11 +92,6 @@ cairo_renderer_init (PinPointRenderer *pp_renderer,
                                           g_object_unref);
 }
 
-static void
-cairo_renderer_cr_render(void    *pp_renderer,
-                         cairo_t *cr);
-
-
 /* This function is adapted from Gtk's gdk_cairo_set_source_pixbuf() you can
  * find in gdk/gdkcairo.c.
  * Copyright (C) Red Had, Inc.
@@ -243,7 +238,7 @@ _cairo_get_surface (CairoRenderer *renderer,
   if (g_str_has_suffix (file, ".jpg") || g_str_has_suffix (file, ".jpeg"))
       {
         unsigned char *data = NULL;
-        guint len;
+        guint len = 0;
 
         _cairo_read_file (file, &data, &len);
         cairo_surface_set_mime_data (surface, CAIRO_MIME_TYPE_JPEG,
diff --git a/pp-clutter.c b/pp-clutter.c
index 8ae18ef..07b3cd7 100644
--- a/pp-clutter.c
+++ b/pp-clutter.c
@@ -76,7 +76,6 @@ static ClutterColor c_prog_slide = {0xff,0xff,0xff,0x77};
 static ClutterColor c_prog_time =  {0xff,0xff,0xff,0x55};
 
 static ClutterColor black = {0x00,0x00,0x00,0xff};
-static ClutterColor gray  = {0x77,0x77,0x77,0xff};
 static ClutterColor white = {0xff,0xff,0xff,0xff};
 static ClutterColor red   = {0xff,0x00,0x00,0xff};
 
@@ -313,13 +312,11 @@ static void
 activate_commandline (ClutterRenderer *renderer)
 {
   PinPointPoint *point;
-  ClutterPointData *data;
 
   if (!pp_slidep)
     return;
 
   point = pp_slidep->data;
-  data = point->data;
 
   clutter_actor_animate (renderer->commandline,
                          CLUTTER_LINEAR, 500,
@@ -331,8 +328,11 @@ activate_commandline (ClutterRenderer *renderer)
                          "opacity",     (int)(point->shading_opacity*0xff*0.33),
                          NULL);
 
-  g_object_set (renderer->commandline, "editable", TRUE,
-                "single-line-mode", TRUE, "activatable", TRUE, NULL);
+  g_object_set (renderer->commandline,
+                "editable", TRUE,
+                "single-line-mode", TRUE,
+                "activatable", TRUE,
+                NULL);
   clutter_actor_grab_key_focus (renderer->commandline);
 }
 
@@ -585,6 +585,8 @@ start_rehearse (ClutterActor *actor,
   start (actor, event, data);
   pp_rehearse = TRUE;
   pp_rehearse_init ();
+
+  return FALSE;
 }
 
 
@@ -982,7 +984,7 @@ setup_camera (PinPointRenderer *renderer,
     {
       g_critical ("Failed to create v4l2src element");
       g_object_unref (pipeline);
-      return;
+      return FALSE;
     }
 
   capsfilter = gst_element_factory_make ("capsfilter", NULL);
@@ -1041,7 +1043,7 @@ clutter_renderer_make_point (PinPointRenderer *pp_renderer,
   const char       *file      = point->bg;
         char       *full_path = NULL;
   ClutterColor color;
-  gboolean ret;
+  gboolean ret = FALSE;
 
   if (point->bg_type != PP_BG_COLOR && renderer->path && file)
     {
@@ -1509,8 +1511,6 @@ static gfloat slide_time (ClutterRenderer *renderer,
 static gboolean update_speaker_screen (ClutterRenderer *renderer)
 {
   PinPointPoint *point;
-  int n_slides;
-  int slide_no;
 
   if (!pp_slidep)
     return FALSE;
@@ -1604,16 +1604,11 @@ static gboolean update_speaker_screen (ClutterRenderer *renderer)
     for (iter = pp_slides, i=0; iter && iter != pp_slidep;
          iter = iter->next, i++);
 
-    slide_no = i + 1;
-    n_slides = g_list_length (pp_slides);
-
     {
       int time;
-      gboolean over_time = FALSE;
       time = renderer->total_seconds -
                       g_timer_elapsed (renderer->timer, NULL) + 0.5;
-      if (time < 0)
-        over_time = TRUE;
+
       if (time <= -60)
         g_string_printf (str, "%imin", time/60);
       else if (time <= 10)
@@ -1697,7 +1692,6 @@ static gboolean update_speaker_screen (ClutterRenderer *renderer)
 
   {
     static GList *current_slide = NULL;
-    float nh, nw;
     if (current_slide != pp_slidep)
       {
         cairo_t *cr;



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