Use G_GNUC_UNUSED macro rather than gcc attribute directly.