[totem] core: Miscellaneous compiler warning fixes



commit 99ff1bcc7f7e5b90bfd6c167f027b738011e5c7c
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Aug 4 15:37:31 2013 +0200

    core: Miscellaneous compiler warning fixes

 src/backend/bacon-video-controls-actor.c |    4 ++--
 src/backend/bacon-video-widget.c         |   12 +++++++-----
 src/backend/clock.c                      |    3 ++-
 src/totem-object.c                       |   12 ++++++------
 4 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/src/backend/bacon-video-controls-actor.c b/src/backend/bacon-video-controls-actor.c
index 008ee25..eae21a9 100644
--- a/src/backend/bacon-video-controls-actor.c
+++ b/src/backend/bacon-video-controls-actor.c
@@ -93,14 +93,14 @@ setup_object (BaconVideoControlsActor *controls,
 static void
 bacon_video_controls_actor_init (BaconVideoControlsActor *controls)
 {
-       char *objects[] = { "toolbar", NULL };
+       const char *objects[] = { "toolbar", NULL };
 
        controls->priv = BACON_VIDEO_CONTROLS_ACTOR_GET_PRIVATE (G_OBJECT (controls));
 
        g_type_class_ref (BACON_TYPE_TIME_LABEL);
 
        controls->priv->builder = gtk_builder_new ();
-       if (gtk_builder_add_objects_from_file (controls->priv->builder, DATADIR "/controls.ui", objects, 
NULL) == 0)
+       if (gtk_builder_add_objects_from_file (controls->priv->builder, DATADIR "/controls.ui", (gchar **) 
objects, NULL) == 0)
                g_assert_not_reached ();
 
        setup_object (controls, "seek_scale");
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 60e0578..3338a61 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -3445,7 +3445,7 @@ bacon_video_widget_popup_osd (BaconVideoWidget *bvw,
 GObject *
 bacon_video_widget_get_controls_object (BaconVideoWidget *bvw)
 {
-  g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
+  g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), NULL);
 
   return G_OBJECT (bvw->priv->controls);
 }
@@ -3453,7 +3453,7 @@ bacon_video_widget_get_controls_object (BaconVideoWidget *bvw)
 GObject *
 bacon_video_widget_get_header_object (BaconVideoWidget *bvw)
 {
-  g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
+  g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), NULL);
 
   return G_OBJECT (bvw->priv->header);
 }
@@ -4913,9 +4913,10 @@ void
 bacon_video_widget_set_aspect_ratio (BaconVideoWidget *bvw,
                                 BvwAspectRatio ratio)
 {
-  g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
   GstMessage *msg;
 
+  g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
+
   bvw->priv->ratio_type = ratio;
   msg = gst_message_new_application (GST_OBJECT (bvw->priv->play),
       gst_structure_new ("video-size", "width", G_TYPE_INT,
@@ -5217,11 +5218,12 @@ bacon_video_widget_set_video_property (BaconVideoWidget *bvw,
                                        BvwVideoProperty type,
                                        int value)
 {
-  g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
-  g_return_if_fail (bvw->priv->play != NULL);
   GstColorBalanceChannel *found_channel = NULL;
   int i_value;
 
+  g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
+  g_return_if_fail (bvw->priv->play != NULL);
+
   GST_DEBUG ("set video property type %d to value %d", type, value);
 
   if ( !(value <= 65535 && value >= 0) )
diff --git a/src/backend/clock.c b/src/backend/clock.c
index dacad0f..9a4cd29 100644
--- a/src/backend/clock.c
+++ b/src/backend/clock.c
@@ -113,9 +113,10 @@ clock_get_property (GObject      *object,
 static void
 clock_init (Clock *self)
 {
+  ClutterContent *content;
+
   self->angle = 0;
 
-  ClutterContent *content;
   content = clutter_canvas_new ();
   clutter_canvas_set_size (CLUTTER_CANVAS (content),
                            CLOCK_RADIUS + 2,
diff --git a/src/totem-object.c b/src/totem-object.c
index 6f56569..ef7fae2 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -563,7 +563,7 @@ totem_object_empty_menu_section (TotemObject *totem,
 {
        GMenu *menu;
 
-       g_return_val_if_fail (TOTEM_IS_OBJECT (totem), NULL);
+       g_return_if_fail (TOTEM_IS_OBJECT (totem));
 
        menu = G_MENU (gtk_builder_get_object (totem->xml, id));
        g_return_if_fail (menu != NULL);
@@ -1756,6 +1756,11 @@ totem_object_set_mrl (TotemObject *totem,
                char *user_agent;
                char *autoload_sub;
 
+               /* cast is to shut gcc up */
+               const GtkTargetEntry source_table[] = {
+                       { (gchar*) "text/uri-list", 0, 0 }
+               };
+
                bacon_video_widget_set_logo_mode (totem->bvw, FALSE);
 
                autoload_sub = NULL;
@@ -1788,11 +1793,6 @@ totem_object_set_mrl (TotemObject *totem,
                /* Set the playlist */
                play_pause_set_label (totem, STATE_PAUSED);
 
-               /* cast is to shut gcc up */
-               const GtkTargetEntry source_table[] = {
-                       { (gchar*) "text/uri-list", 0, 0 }
-               };
-
                emit_file_opened (totem, totem->mrl);
 
                /* Set the drag source */


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