GStaticMutex operation: compiler warning



Hi all,

given a piece of codes:

GStaticMutex mutex = G_STATIC_MUTEX_INIT;

func()
{
  g_static_mutex_lock (&mutex);
}

gcc give me a warning like this: 
---> deferencing type punned pointer will break strict-aliasing rules
this warning mostly on g_static_mutex*() operation

It's on gcc-4.3.2, glib-2.16.6, my question is: Is it safe to just dismiss this warning? and how could it 
affect my codes.

Thanks,
         -- ajhwb


_____________________________________________________________
Listen to KNAC, Hit the Home page and Tune In Live! ---> http://www.knac.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]