summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2013-08-30 14:14:22 -0400
committerBehdad Esfahbod <behdad@behdad.org>2013-08-30 14:14:47 -0400
commit14b0697a59f51dd017038ca2bb79ba2c2f4034df (patch)
treef660c2380fe4e3dd9cc1b8faca426f81264c6e36 /pango
parentce791d34b18215bd89a31d9eeac9e72b2b8ceb77 (diff)
downloadpango-14b0697a59f51dd017038ca2bb79ba2c2f4034df.tar.gz
Bug 703995 - Compiler warnings about strict aliasing
Patch from Akira TAGOH.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-context.c4
-rw-r--r--pango/pango-engine.c4
-rw-r--r--pango/pango-utils.c12
-rw-r--r--pango/pangocairo-fcfont.c4
-rw-r--r--pango/pangofc-fontmap.c4
-rw-r--r--pango/pangoft2-fontmap.c4
6 files changed, 16 insertions, 16 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 8e967134..8bb6a86e 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1412,8 +1412,8 @@ string_from_script (PangoScript script)
{
static GEnumClass *class = NULL; /* MT-safe */
GEnumValue *value;
- if (g_once_init_enter ((gsize*)&class))
- g_once_init_leave((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_SCRIPT));
+ if (g_once_init_enter (&class))
+ g_once_init_leave(&class, (gpointer)g_type_class_ref (PANGO_TYPE_SCRIPT));
value = g_enum_get_value (class, script);
if (!value)
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
index 994c722b..04de3df7 100644
--- a/pango/pango-engine.c
+++ b/pango/pango-engine.c
@@ -205,8 +205,8 @@ PangoEngineShape *
_pango_get_fallback_shaper (void)
{
static PangoEngineShape *fallback_shaper = NULL; /* MT-safe */
- if (g_once_init_enter ((gsize*)&fallback_shaper))
- g_once_init_leave((gsize*)&fallback_shaper, (gsize)g_object_new (pango_fallback_engine_get_type (), NULL));
+ if (g_once_init_enter (&fallback_shaper))
+ g_once_init_leave(&fallback_shaper, g_object_new (pango_fallback_engine_get_type (), NULL));
return fallback_shaper;
}
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 18ffa263..1ca2de6f 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -616,7 +616,7 @@ read_config (void)
{
static GHashTable *config_hash = NULL;
- if (g_once_init_enter ((gsize*)&config_hash))
+ if (g_once_init_enter (&config_hash))
{
GHashTable *tmp_hash;
char *filename;
@@ -635,7 +635,7 @@ read_config (void)
if (envvar)
read_config_file (envvar, TRUE, tmp_hash);
- g_once_init_leave ((gsize*)&config_hash, (gsize)tmp_hash);
+ g_once_init_leave (&config_hash, tmp_hash);
}
return config_hash;
@@ -728,7 +728,7 @@ pango_get_sysconf_subdirectory (void)
{
static const gchar *result = NULL; /* MT-safe */
- if (g_once_init_enter ((gsize*)&result))
+ if (g_once_init_enter (&result))
{
const char *tmp_result = NULL;
#ifdef G_OS_WIN32
@@ -742,7 +742,7 @@ pango_get_sysconf_subdirectory (void)
else
tmp_result = SYSCONFDIR "/pango";
#endif
- g_once_init_leave((gsize*)&result, (gsize)tmp_result);
+ g_once_init_leave(&result, tmp_result);
}
return result;
}
@@ -763,7 +763,7 @@ pango_get_lib_subdirectory (void)
{
static const gchar *result = NULL; /* MT-safe */
- if (g_once_init_enter ((gsize*)&result))
+ if (g_once_init_enter (&result))
{
const gchar *tmp_result = NULL;
#ifdef G_OS_WIN32
@@ -783,7 +783,7 @@ pango_get_lib_subdirectory (void)
else
tmp_result = LIBDIR "/pango";
#endif
- g_once_init_leave((gsize*)&result, (gsize)tmp_result);
+ g_once_init_leave(&result, tmp_result);
}
return result;
}
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c
index ee826756..7dde713d 100644
--- a/pango/pangocairo-fcfont.c
+++ b/pango/pangocairo-fcfont.c
@@ -187,8 +187,8 @@ get_gravity_class (void)
{
static GEnumClass *class = NULL; /* MT-safe */
- if (g_once_init_enter ((gsize*)&class))
- g_once_init_leave((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_GRAVITY));
+ if (g_once_init_enter (&class))
+ g_once_init_leave(&class, (gpointer)g_type_class_ref (PANGO_TYPE_GRAVITY));
return class;
}
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 992de4e9..05fed2d5 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -239,8 +239,8 @@ get_gravity_class (void)
{
static GEnumClass *class = NULL; /* MT-safe */
- if (g_once_init_enter ((gsize*)&class))
- g_once_init_leave ((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_GRAVITY));
+ if (g_once_init_enter (&class))
+ g_once_init_leave (&class, (gpointer)g_type_class_ref (PANGO_TYPE_GRAVITY));
return class;
}
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c
index aed5a234..3b43fbd6 100644
--- a/pango/pangoft2-fontmap.c
+++ b/pango/pangoft2-fontmap.c
@@ -305,8 +305,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
PangoFontMap *
pango_ft2_font_map_for_display (void)
{
- if (g_once_init_enter ((gsize*)&pango_ft2_global_fontmap))
- g_once_init_leave((gsize*)&pango_ft2_global_fontmap, (gsize)pango_ft2_font_map_new ());
+ if (g_once_init_enter (&pango_ft2_global_fontmap))
+ g_once_init_leave(&pango_ft2_global_fontmap, PANGO_FT2_FONT_MAP (pango_ft2_font_map_new ()));
return PANGO_FONT_MAP (pango_ft2_global_fontmap);
}