Fix warnings from sparse. (#487491, Kjartan Maraas)

2007-10-21  Behdad Esfahbod  <behdad@gnome.org>

        * glib/gdate.c (g_date_strftime):
        * glib/gmain.c (g_main_context_check):
        * glib/gregex.c (g_match_info_fetch_all), (g_regex_split_full):
        * glib/gthread.c (g_once_init_enter_impl), (g_once_init_leave):
        * glib/gthread.h:
        * glib/gutf8.c (g_utf16_to_utf8), (g_utf16_to_ucs4):
        * tests/errorcheck-mutex-test.c (lock_locked_mutex),
        (trylock_locked_mutex), (unlock_unlocked_mutex),
        (free_locked_mutex), (wait_on_unlocked_mutex),
        (wait_on_otherwise_locked_mutex), (timed_wait_on_unlocked_mutex),
        (timed_wait_on_otherwise_locked_mutex):
        Fix warnings from sparse. (#487491, Kjartan Maraas)


svn path=/trunk/; revision=5792
This commit is contained in:
Behdad Esfahbod
2007-10-21 17:01:29 +00:00
committed by Behdad Esfahbod
parent f089429b85
commit 9df1f4fcc7
8 changed files with 33 additions and 18 deletions

View File

@@ -332,7 +332,7 @@ void g_once_init_leave (volatile gsize *value_location,
G_INLINE_FUNC gboolean
g_once_init_enter (volatile gsize *value_location)
{
if G_LIKELY (g_atomic_pointer_get ((void*volatile*) value_location) != 0)
if G_LIKELY (g_atomic_pointer_get ((void*volatile*) value_location) != NULL)
return FALSE;
else
return g_once_init_enter_impl (value_location);