cogl: 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-25 00:19:21 +01:00
parent 8655bc5d8d
commit 5c3ec27b4b
5 changed files with 6 additions and 0 deletions

View File

@ -355,6 +355,7 @@ _cogl_bitmap_needs_short_temp_buffer (CoglPixelFormat format)
}
g_assert_not_reached ();
return FALSE;
}
CoglBool

View File

@ -112,6 +112,7 @@ update_hints_to_gl_enum (CoglBuffer *buffer)
}
g_assert_not_reached ();
return 0;
}
static GLenum

View File

@ -135,6 +135,7 @@ get_error_string (void)
return "Invalid surface";
default:
g_assert_not_reached ();
return NULL;
}
}
@ -219,6 +220,7 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
{
/* This function must be overridden by a platform winsys */
g_assert_not_reached ();
return FALSE;
}
static void

View File

@ -30,6 +30,7 @@ calc_coord_offset (int pos, int pos_index, int point_size)
}
g_assert_not_reached ();
return 0;
}
static void

View File

@ -22,6 +22,7 @@ calc_coord_offset (int pos, int pos_index, int point_size)
}
g_assert_not_reached ();
return 0;
}
static void