From 18ade94c893dd571d2b7765206f1e33f09cede50 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 7 Nov 2014 15:58:51 +0100 Subject: client API: silence silly clang warning The values compared here happen to be of unsigned enum types - but the test is not supposed to break if we somehow force the enum to signed, or if the compiler happens to use a signed type (as far as I remember, the exact integer type the compiler can use is implementation-defined). --- player/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player') diff --git a/player/client.c b/player/client.c index 6a8204615f..6fc4546a06 100644 --- a/player/client.c +++ b/player/client.c @@ -707,7 +707,7 @@ static const struct m_option type_conv[] = { static const struct m_option *get_mp_type(mpv_format format) { - if (format < 0 || format >= MP_ARRAY_SIZE(type_conv)) + if ((unsigned)format >= MP_ARRAY_SIZE(type_conv)) return NULL; if (!type_conv[format].type) return NULL; @@ -1527,7 +1527,7 @@ static const char *const event_table[] = { const char *mpv_event_name(mpv_event_id event) { - if (event < 0 || event >= MP_ARRAY_SIZE(event_table)) + if ((unsigned)event >= MP_ARRAY_SIZE(event_table)) return NULL; return event_table[event]; } -- cgit v1.2.3