Whenever a platform is missing a case statement, the default will kick in throwing an error and exiting the function.
Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com> --- src/waffle/api/waffle_init.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/waffle/api/waffle_init.c b/src/waffle/api/waffle_init.c index b45c3ba..9baf271 100644 --- a/src/waffle/api/waffle_init.c +++ b/src/waffle/api/waffle_init.c @@ -40,8 +40,6 @@ waffle_init_parse_attrib_list( const int32_t attrib_list[], int *platform) { - bool found_platform = false; - for (const int32_t *i = attrib_list; *i != 0; i += 2) { const int32_t attr = i[0]; const int32_t value = i[1]; @@ -51,7 +49,6 @@ waffle_init_parse_attrib_list( switch (value) { #define CASE_DEFINED_PLATFORM(name) \ case WAFFLE_PLATFORM_##name : \ - found_platform = true; \ *platform = value; \ break; @@ -116,12 +113,6 @@ waffle_init_parse_attrib_list( } } - if (!found_platform) { - wcore_errorf(WAFFLE_ERROR_BAD_ATTRIBUTE, - "attribute list is missing WAFFLE_PLATFORM"); - return false; - } - return true; } -- 1.9.3 _______________________________________________ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle