Bug 316221 - G_LOCK warns about breaking strict-aliasing rules

* configure.in:
* glib/gthread.h: Revert previous patch as it doesn't improve the
situation and results in other warnings.

svn path=/trunk/; revision=7064
This commit is contained in:
Sebastian Dröge 2008-06-20 11:29:25 +00:00
parent ee5c5df6b1
commit 304c030d02
3 changed files with 8 additions and 12 deletions

View File

@ -1,3 +1,11 @@
2008-06-20 Sebastian Dröge <slomo@circular-chaos.org>
Bug 316221 - G_LOCK warns about breaking strict-aliasing rules
* configure.in:
* glib/gthread.h: Revert previous patch as it doesn't improve the
situation and results in other warnings.
2008-06-16 Christian Persch <chpe@gnome.org> 2008-06-16 Christian Persch <chpe@gnome.org>
Bug 539123 annotate g_d[n]gettext with G_GNUC_FORMAT Bug 539123 annotate g_d[n]gettext with G_GNUC_FORMAT

View File

@ -2844,15 +2844,9 @@ struct _GStaticMutex
} static_mutex; } static_mutex;
}; };
#define G_STATIC_MUTEX_INIT { NULL, { { $g_mutex_contents} } } #define G_STATIC_MUTEX_INIT { NULL, { { $g_mutex_contents} } }
#ifdef __cplusplus
#define g_static_mutex_get_mutex(mutex) \\ #define g_static_mutex_get_mutex(mutex) \\
(g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \\ (g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \\
g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex))) g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
#else
#define g_static_mutex_get_mutex(mutex) \\
(g_thread_use_default_impl ? ((GMutex*) (void*) ((mutex)->static_mutex.pad)) : \\
g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
#endif
_______EOF _______EOF
else else
cat >>$outfile <<_______EOF cat >>$outfile <<_______EOF

View File

@ -144,15 +144,9 @@ void g_thread_init_with_errorcheck_mutexes (GThreadFunctions* vtable);
/* internal function for fallback static mutex implementation */ /* internal function for fallback static mutex implementation */
GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex); GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex);
#ifdef __cplusplus
#define g_static_mutex_get_mutex_impl_shortcut(mutex) \ #define g_static_mutex_get_mutex_impl_shortcut(mutex) \
(g_atomic_pointer_get ((gpointer*)(void*)mutex) ? *(mutex) : \ (g_atomic_pointer_get ((gpointer*)(void*)mutex) ? *(mutex) : \
g_static_mutex_get_mutex_impl (mutex)) g_static_mutex_get_mutex_impl (mutex))
#else
#define g_static_mutex_get_mutex_impl_shortcut(mutex) \
(g_atomic_pointer_get (mutex) ? *(mutex) : \
g_static_mutex_get_mutex_impl (mutex))
#endif
/* shorthands for conditional and unconditional function calls */ /* shorthands for conditional and unconditional function calls */