Skip to content
  • Debarshi Ray's avatar
    Silence warnings with GLib 2.57.2 · a26aff98
    Debarshi Ray authored
    The g_clear_pointer macro in GLib gained a bit of type safety when
    using GCC and GCC-compatible compilers. It checks if the function
    pointer is meant to accept a pointer to the type that the first
    argument refers to. Now, GCC doesn't like it if the function pointer is
    cast to GDestroyNotify, and emits this warning:
      warning: function called through a non-compatible type
    
    Since the macro, even the earlier version of it, was explicitly
    designed to avoid the need to cast the arguments, these redundant casts
    should be removed.
    
    glib#1425
    a26aff98