Blame SOURCES/pango-fix-strict-aliasing-warning.patch

9301b1
From 14b0697a59f51dd017038ca2bb79ba2c2f4034df Mon Sep 17 00:00:00 2001
9301b1
From: Behdad Esfahbod <behdad@behdad.org>
9301b1
Date: Fri, 30 Aug 2013 14:14:22 -0400
9301b1
Subject: [PATCH] Bug 703995 - Compiler warnings about strict aliasing
9301b1
9301b1
Patch from Akira TAGOH.
9301b1
---
9301b1
 pango/pango-context.c     |  4 ++--
9301b1
 pango/pango-engine.c      |  4 ++--
9301b1
 pango/pango-utils.c       | 12 ++++++------
9301b1
 pango/pangocairo-fcfont.c |  4 ++--
9301b1
 pango/pangofc-fontmap.c   |  4 ++--
9301b1
 pango/pangoft2-fontmap.c  |  4 ++--
9301b1
 6 files changed, 16 insertions(+), 16 deletions(-)
9301b1
9301b1
diff --git a/pango/pango-context.c b/pango/pango-context.c
9301b1
index 8e96713..8bb6a86 100644
9301b1
--- a/pango/pango-context.c
9301b1
+++ b/pango/pango-context.c
9301b1
@@ -1412,8 +1412,8 @@ string_from_script (PangoScript script)
9301b1
 {
9301b1
   static GEnumClass *class = NULL; /* MT-safe */
9301b1
   GEnumValue *value;
9301b1
-  if (g_once_init_enter ((gsize*)&class))
9301b1
-    g_once_init_leave((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_SCRIPT));
9301b1
+  if (g_once_init_enter (&class))
9301b1
+    g_once_init_leave(&class, (gpointer)g_type_class_ref (PANGO_TYPE_SCRIPT));
9301b1
 
9301b1
   value = g_enum_get_value (class, script);
9301b1
   if (!value)
9301b1
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
9301b1
index 994c722..04de3df 100644
9301b1
--- a/pango/pango-engine.c
9301b1
+++ b/pango/pango-engine.c
9301b1
@@ -205,8 +205,8 @@ PangoEngineShape *
9301b1
 _pango_get_fallback_shaper (void)
9301b1
 {
9301b1
   static PangoEngineShape *fallback_shaper = NULL; /* MT-safe */
9301b1
-  if (g_once_init_enter ((gsize*)&fallback_shaper))
9301b1
-    g_once_init_leave((gsize*)&fallback_shaper, (gsize)g_object_new (pango_fallback_engine_get_type (), NULL));
9301b1
+  if (g_once_init_enter (&fallback_shaper))
9301b1
+    g_once_init_leave(&fallback_shaper, g_object_new (pango_fallback_engine_get_type (), NULL));
9301b1
 
9301b1
   return fallback_shaper;
9301b1
 }
9301b1
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
9301b1
index 18ffa26..1ca2de6 100644
9301b1
--- a/pango/pango-utils.c
9301b1
+++ b/pango/pango-utils.c
9301b1
@@ -616,7 +616,7 @@ read_config (void)
9301b1
 {
9301b1
   static GHashTable *config_hash = NULL;
9301b1
 
9301b1
-  if (g_once_init_enter ((gsize*)&config_hash))
9301b1
+  if (g_once_init_enter (&config_hash))
9301b1
     {
9301b1
       GHashTable *tmp_hash;
9301b1
       char *filename;
9301b1
@@ -635,7 +635,7 @@ read_config (void)
9301b1
       if (envvar)
9301b1
         read_config_file (envvar, TRUE, tmp_hash);
9301b1
 
9301b1
-      g_once_init_leave ((gsize*)&config_hash, (gsize)tmp_hash);
9301b1
+      g_once_init_leave (&config_hash, tmp_hash);
9301b1
     }
9301b1
 
9301b1
   return config_hash;
9301b1
@@ -728,7 +728,7 @@ pango_get_sysconf_subdirectory (void)
9301b1
 {
9301b1
   static const gchar *result = NULL; /* MT-safe */
9301b1
 
9301b1
-  if (g_once_init_enter ((gsize*)&result))
9301b1
+  if (g_once_init_enter (&result))
9301b1
     {
9301b1
       const char *tmp_result = NULL;
9301b1
 #ifdef G_OS_WIN32
9301b1
@@ -742,7 +742,7 @@ pango_get_sysconf_subdirectory (void)
9301b1
       else
9301b1
 	tmp_result = SYSCONFDIR "/pango";
9301b1
 #endif
9301b1
-      g_once_init_leave((gsize*)&result, (gsize)tmp_result);
9301b1
+      g_once_init_leave(&result, tmp_result);
9301b1
     }
9301b1
   return result;
9301b1
 }
9301b1
@@ -763,7 +763,7 @@ pango_get_lib_subdirectory (void)
9301b1
 {
9301b1
   static const gchar *result = NULL; /* MT-safe */
9301b1
 
9301b1
-  if (g_once_init_enter ((gsize*)&result))
9301b1
+  if (g_once_init_enter (&result))
9301b1
     {
9301b1
       const gchar *tmp_result = NULL;
9301b1
 #ifdef G_OS_WIN32
9301b1
@@ -783,7 +783,7 @@ pango_get_lib_subdirectory (void)
9301b1
       else
9301b1
 	tmp_result = LIBDIR "/pango";
9301b1
 #endif
9301b1
-      g_once_init_leave((gsize*)&result, (gsize)tmp_result);
9301b1
+      g_once_init_leave(&result, tmp_result);
9301b1
     }
9301b1
   return result;
9301b1
 }
9301b1
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c
9301b1
index ee82675..7dde713 100644
9301b1
--- a/pango/pangocairo-fcfont.c
9301b1
+++ b/pango/pangocairo-fcfont.c
9301b1
@@ -187,8 +187,8 @@ get_gravity_class (void)
9301b1
 {
9301b1
   static GEnumClass *class = NULL; /* MT-safe */
9301b1
 
9301b1
-  if (g_once_init_enter ((gsize*)&class))
9301b1
-    g_once_init_leave((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_GRAVITY));
9301b1
+  if (g_once_init_enter (&class))
9301b1
+    g_once_init_leave(&class, (gpointer)g_type_class_ref (PANGO_TYPE_GRAVITY));
9301b1
 
9301b1
   return class;
9301b1
 }
9301b1
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
9301b1
index 992de4e..05fed2d 100644
9301b1
--- a/pango/pangofc-fontmap.c
9301b1
+++ b/pango/pangofc-fontmap.c
9301b1
@@ -239,8 +239,8 @@ get_gravity_class (void)
9301b1
 {
9301b1
   static GEnumClass *class = NULL; /* MT-safe */
9301b1
 
9301b1
-  if (g_once_init_enter ((gsize*)&class))
9301b1
-    g_once_init_leave ((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_GRAVITY));
9301b1
+  if (g_once_init_enter (&class))
9301b1
+    g_once_init_leave (&class, (gpointer)g_type_class_ref (PANGO_TYPE_GRAVITY));
9301b1
 
9301b1
   return class;
9301b1
 }
9301b1
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c
9301b1
index aed5a23..3b43fbd 100644
9301b1
--- a/pango/pangoft2-fontmap.c
9301b1
+++ b/pango/pangoft2-fontmap.c
9301b1
@@ -305,8 +305,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
9301b1
 PangoFontMap *
9301b1
 pango_ft2_font_map_for_display (void)
9301b1
 {
9301b1
-  if (g_once_init_enter ((gsize*)&pango_ft2_global_fontmap))
9301b1
-    g_once_init_leave((gsize*)&pango_ft2_global_fontmap, (gsize)pango_ft2_font_map_new ());
9301b1
+  if (g_once_init_enter (&pango_ft2_global_fontmap))
9301b1
+    g_once_init_leave(&pango_ft2_global_fontmap, PANGO_FT2_FONT_MAP (pango_ft2_font_map_new ()));
9301b1
 
9301b1
   return PANGO_FONT_MAP (pango_ft2_global_fontmap);
9301b1
 }
9301b1
-- 
9301b1
1.8.3.1
9301b1