[Swfdec] [PATCH] Fix all warnings

Pavel Roskin proski at gnu.org
Mon Jan 21 16:32:41 PST 2008


Signed-off-by: Pavel Roskin <proski at gnu.org>
---

 libswfdec/swfdec_net_stream.c          |    2 +-
 libswfdec/swfdec_policy_file.c         |    2 +-
 libswfdec/swfdec_text_field_movie.c    |    2 +-
 libswfdec/swfdec_text_field_movie_as.c |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c
index 9df71e0..fd6e2a9 100644
--- a/libswfdec/swfdec_net_stream.c
+++ b/libswfdec/swfdec_net_stream.c
@@ -504,11 +504,11 @@ swfdec_net_stream_set_url (SwfdecNetStream *stream, SwfdecSandbox *sandbox, cons
 
   g_return_if_fail (SWFDEC_IS_NET_STREAM (stream));
   g_return_if_fail (SWFDEC_IS_SANDBOX (sandbox));
-  g_return_if_fail (url != NULL);
 
   cx = SWFDEC_AS_OBJECT (stream)->context;
   player = SWFDEC_PLAYER (cx);
   url = swfdec_url_new_relative (swfdec_loader_get_url (player->priv->resource->loader), url_string);
+  g_return_if_fail (url != NULL);
   stream->sandbox = sandbox;
   if (swfdec_url_is_local (url)) {
     swfdec_net_stream_load (player, url, TRUE, stream);
diff --git a/libswfdec/swfdec_policy_file.c b/libswfdec/swfdec_policy_file.c
index 34a532d..b2d1450 100644
--- a/libswfdec/swfdec_policy_file.c
+++ b/libswfdec/swfdec_policy_file.c
@@ -286,7 +286,7 @@ swfdec_policy_file_allow (SwfdecPolicyFile *file, const SwfdecURL *url)
   if (hostname == NULL)
     hostname = "?";
   len = strlen (hostname);
-  emantsoh = g_utf8_strreverse (emantsoh, len);
+  emantsoh = g_utf8_strreverse (hostname, len);
   for (walk = file->allowed_hosts; walk; walk = walk->next) {
     GPatternSpec *pattern = walk->data;
     if (g_pattern_match (pattern, len, hostname, emantsoh)) {
diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c
index 8f8af44..84a4001 100644
--- a/libswfdec/swfdec_text_field_movie.c
+++ b/libswfdec/swfdec_text_field_movie.c
@@ -1066,7 +1066,7 @@ swfdec_text_field_movie_dispose (GObject *object)
     g_signal_handlers_disconnect_matched (text->style_sheet, 
 	G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, text);
     g_object_remove_weak_pointer (G_OBJECT (text->style_sheet), 
-	(gpointer *) &text->style_sheet);
+	(gpointer) &text->style_sheet);
   }
   text->style_sheet = NULL;
 
diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index 1003011..7e34120 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -933,7 +933,7 @@ swfdec_text_field_movie_set_styleSheet (SwfdecAsContext *cx,
     g_signal_handlers_disconnect_by_func (text->style_sheet,
 	 swfdec_text_field_movie_style_sheet_update, text);
     g_object_remove_weak_pointer (G_OBJECT (text->style_sheet), 
-	(gpointer *) &text->style_sheet);
+	(gpointer) &text->style_sheet);
   }
 
   text->style_sheet = value;
@@ -942,7 +942,7 @@ swfdec_text_field_movie_set_styleSheet (SwfdecAsContext *cx,
     g_signal_connect_swapped (value, "update",
 	G_CALLBACK (swfdec_text_field_movie_style_sheet_update), text);
     g_object_add_weak_pointer (G_OBJECT (text->style_sheet), 
-	(gpointer *) &text->style_sheet);
+	(gpointer) &text->style_sheet);
 
     swfdec_text_field_movie_style_sheet_update (text);
   }


More information about the Swfdec mailing list