clutter: Fix builds with G_DISABLE_ASSERT

Commit 25f416c13d added additional compilation warnings, including
-Werror=return-type. There are several places where this results
in build failures if `g_assert_not_reached()` is disabled at compile
time and the compiler misses a return value.

https://gitlab.gnome.org/GNOME/mutter/issues/447
This commit is contained in:
Florian Müllner 2019-01-24 23:09:15 +01:00
parent 5c3ec27b4b
commit de41f3ea28
3 changed files with 3 additions and 0 deletions

View File

@ -961,6 +961,7 @@ clutter_pan_action_get_motion_delta (ClutterPanAction *self,
return clutter_pan_action_get_interpolated_delta (self, delta_x, delta_y); return clutter_pan_action_get_interpolated_delta (self, delta_x, delta_y);
default: default:
g_assert_not_reached (); g_assert_not_reached ();
return 0.0f;
} }
} }

View File

@ -333,6 +333,7 @@ clutter_shader_effect_create_shader (ClutterShaderEffect *self)
default: default:
g_assert_not_reached (); g_assert_not_reached ();
return COGL_INVALID_HANDLE;
} }
} }

View File

@ -766,6 +766,7 @@ discrete_to_direction (double discrete_dx,
return CLUTTER_SCROLL_UP; return CLUTTER_SCROLL_UP;
else else
g_assert_not_reached (); g_assert_not_reached ();
return 0;
} }
void void